trim whitespace characters after plain (unquoted) values v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Mon, 23 Nov 2020 18:13:03 +0100
branchv_0
changeset 10 f689cbfc6b44
parent 9 be61125d8ed1
child 11 89cc91936979
trim whitespace characters after plain (unquoted) values
src/lib/INIReader.cpp
--- a/src/lib/INIReader.cpp	Mon Nov 23 17:56:55 2020 +0100
+++ b/src/lib/INIReader.cpp	Mon Nov 23 18:13:03 2020 +0100
@@ -42,7 +42,7 @@
 		std::regex sectionPattrern("\\s*\\[\\s*([^\\]]+)\\s*\\]\\s*(\\[\\s*([^\\]]+)\\s*\\])?\\s*((;|#)\\s*(.*))?");
 		std::regex entryQuotesPattrern(/***/"\\s*(([^=\\]]+?[^=\\s\\]]*)(\\[([^\\]]+)\\])?)\\s*=\\s*\"([^']+)\"\\s*((;|#)\\s*(.*))?");
 		std::regex entryApostrophesPattrern("\\s*(([^=\\]]+?[^=\\s\\]]*)(\\[([^\\]]+)\\])?)\\s*=\\s*'([^']+)'\\s*((;|#)\\s*(.*))?");
-		std::regex entryPlainPattrern("\\s*(([^=\\]]+?[^=\\s\\]]*)(\\[([^\\]]+)\\])?)\\s*=\\s*(.*)");
+		std::regex entryPlainPattrern("\\s*(([^=\\]]+?[^=\\s\\]]*)(\\[([^\\]]+)\\])?)\\s*=\\s*(.+?)\\s*");
 
 		std::smatch match;
 		bool inSection = false;