mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-03 02:02:24 +00:00
Add max rules limit to 32768
Add getLink to template function. Change max ruleset limit in external configs to 64.
This commit is contained in:
3 files changed
+30
-7
No files matched your search
@@ -9,6 +9,8 @@
|
||||
#include "logger.h"
|
||||
#include "misc.h"
|
||||
|
||||
extern std::string managed_config_prefix;
|
||||
|
||||
static inline void parse_json_pointer(nlohmann::json &json, const std::string &path, const std::string &value)
|
||||
{
|
||||
std::string pointer = "/" + replace_all_distinct(path, ".", "/");
|
||||
@@ -110,6 +112,10 @@ int render_template(const std::string &content, const template_args &vars, std::
|
||||
data[nlohmann::json::json_pointer(pointer)] = output_content;
|
||||
return std::string();
|
||||
});
|
||||
m_callbacks.add_callback("getLink", 1, [](inja::Arguments &args)
|
||||
{
|
||||
return managed_config_prefix + args.at(0)->get<std::string>();
|
||||
});
|
||||
m_callbacks.add_callback("fetch", 1, template_webGet);
|
||||
m_callbacks.add_callback("parseHostname", 1, parseHostname);
|
||||
m_parser_config.include_scope_limit = true;
|
||||
|
||||
Reference in new issue
Block a user