mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-02 01:33:04 +00:00
Enhancements
Improve subscription recognition. INIReader: Add back line break detect.
This commit is contained in:
2 files changed
+4
-4
No files matched your search
+3
-3
@@ -129,7 +129,7 @@ public:
|
|||||||
string_multimap itemGroup, existItemGroup;
|
string_multimap itemGroup, existItemGroup;
|
||||||
std::stringstream strStrm;
|
std::stringstream strStrm;
|
||||||
unsigned int lineSize = 0;
|
unsigned int lineSize = 0;
|
||||||
//char delimiter = count(content.begin(), content.end(), '\n') <= 1 ? '\r' : '\n';
|
char delimiter = count(content.begin(), content.end(), '\n') <= 1 ? '\r' : '\n';
|
||||||
|
|
||||||
EraseAll(); //first erase all data
|
EraseAll(); //first erase all data
|
||||||
if(do_utf8_to_gbk && is_str_utf8(content))
|
if(do_utf8_to_gbk && is_str_utf8(content))
|
||||||
@@ -138,8 +138,8 @@ public:
|
|||||||
if(store_isolated_line)
|
if(store_isolated_line)
|
||||||
curSection = isolated_items_section; //items before any section define will be store in this section
|
curSection = isolated_items_section; //items before any section define will be store in this section
|
||||||
strStrm<<content;
|
strStrm<<content;
|
||||||
//while(getline(strStrm, strLine, delimiter))
|
while(getline(strStrm, strLine, delimiter))
|
||||||
while(getline(strStrm, strLine)) //get one line of content
|
//while(getline(strStrm, strLine)) //get one line of content
|
||||||
{
|
{
|
||||||
lineSize = strLine.size();
|
lineSize = strLine.size();
|
||||||
if(!lineSize || strLine[0] == ';' || strLine[0] == '#') //empty lines and comments are ignored
|
if(!lineSize || strLine[0] == ';' || strLine[0] == '#') //empty lines and comments are ignored
|
||||||
|
|||||||
+1
-1
@@ -1251,7 +1251,7 @@ bool explodeSurge(std::string surge, std::string custom_port, int local_port, st
|
|||||||
nodes.push_back(node);
|
nodes.push_back(node);
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
return true;
|
return index;
|
||||||
}
|
}
|
||||||
|
|
||||||
void explodeSSTap(std::string sstap, std::string custom_port, int local_port, std::vector<nodeInfo> &nodes, bool ss_libev, bool ssr_libev)
|
void explodeSSTap(std::string sstap, std::string custom_port, int local_port, std::vector<nodeInfo> &nodes, bool ss_libev, bool ssr_libev)
|
||||||
|
|||||||
Reference in new issue
Block a user