mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-02 01:33:04 +00:00
Fix empty lines in rulesets not being removed
This commit is contained in:
1 file changed
+1
-1
+1
-1
@@ -324,9 +324,9 @@ void rulesetToClash(YAML::Node &base_rule, std::vector<ruleset_content> &ruleset
|
|||||||
while(getline(strStrm, strLine, delimiter))
|
while(getline(strStrm, strLine, delimiter))
|
||||||
{
|
{
|
||||||
lineSize = strLine.size();
|
lineSize = strLine.size();
|
||||||
|
strLine = replace_all_distinct(strLine, "\r", ""); //remove line break
|
||||||
if(!lineSize || strLine[0] == ';' || strLine[0] == '#' || (lineSize >= 2 && strLine[0] == '/' && strLine[1] == '/')) //empty lines and comments are ignored
|
if(!lineSize || strLine[0] == ';' || strLine[0] == '#' || (lineSize >= 2 && strLine[0] == '/' && strLine[1] == '/')) //empty lines and comments are ignored
|
||||||
continue;
|
continue;
|
||||||
strLine = replace_all_distinct(strLine, "\r", ""); //remove line break
|
|
||||||
if(strLine.find("USER-AGENT") == 0 || strLine.find("URL-REGEX") == 0 || strLine.find("PROCESS-NAME") == 0 || strLine.find("AND") == 0 || strLine.find("OR") == 0) //remove unsupported types
|
if(strLine.find("USER-AGENT") == 0 || strLine.find("URL-REGEX") == 0 || strLine.find("PROCESS-NAME") == 0 || strLine.find("AND") == 0 || strLine.find("OR") == 0) //remove unsupported types
|
||||||
continue;
|
continue;
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in new issue
Block a user