diff --git a/src/subexport.cpp b/src/subexport.cpp index c3b984d..6ccc51e 100644 --- a/src/subexport.cpp +++ b/src/subexport.cpp @@ -320,11 +320,13 @@ void rulesetToClash(YAML::Node &base_rule, std::vector &ruleset strStrm.clear(); strStrm<= 2 && strLine[0] == '/' && strLine[1] == '/')) //empty lines and comments are ignored 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 continue; /* @@ -417,13 +419,15 @@ void rulesetToSurge(INIReader &base_rule, std::vector &ruleset_ strStrm.clear(); strStrm<= 2 && strLine[0] == '/' && strLine[1] == '/')) //empty lines and comments are ignored + continue; if((surge_ver == -1 || surge_ver == -2) && (strLine.find("IP-CIDR6") == 0 || strLine.find("URL-REGEX") == 0 || strLine.find("PROCESS-NAME") == 0 || strLine.find("AND") == 0 || strLine.find("OR") == 0)) //remove unsupported types continue; strLine = replace_all_distinct(strLine, "\r", ""); //remove line break - if(!strLine.size() || strLine.find("#") == 0 || strLine.find(";") == 0) //remove comments - continue; strLine += "," + rule_group; if(surge_ver == -1 || surge_ver == -2) {