summaryrefslogtreecommitdiff
path: root/src/srcut.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/srcut.cpp')
-rw-r--r--src/srcut.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/srcut.cpp b/src/srcut.cpp
index 042608e..6df435b 100644
--- a/src/srcut.cpp
+++ b/src/srcut.cpp
@@ -10,8 +10,11 @@ using namespace std;
10istream& 10istream&
11operator>>(istream& in, map<string, vector<string>>& container) 11operator>>(istream& in, map<string, vector<string>>& container)
12{ 12{
13 static constexpr auto begin_marker = "--8<--";
14 static constexpr auto end_marker = "-->8--";
15
13 auto is_comment = [](string_view s) -> bool { 16 auto is_comment = [](string_view s) -> bool {
14 return s == "//" || s == "/*" || s == "#" || s == "--"; 17 return s == "//" || s == "/*" || s == "#" || s == "##" || s == "--";
15 }; 18 };
16 19
17 // --8<-- match_begin 20 // --8<-- match_begin
@@ -28,7 +31,7 @@ operator>>(istream& in, map<string, vector<string>>& container)
28 return false; 31 return false;
29 } 32 }
30 33
31 if ( cut_mark != "--8<--" ) { 34 if ( cut_mark != begin_marker ) {
32 return false; 35 return false;
33 } 36 }
34 37
@@ -50,7 +53,7 @@ operator>>(istream& in, map<string, vector<string>>& container)
50 return false; 53 return false;
51 } 54 }
52 55
53 if ( cut_mark != "-->8--" ) { 56 if ( cut_mark != end_marker ) {
54 return false; 57 return false;
55 } 58 }
56 59