emit also the section comments: e.g. „[section] ; comment“ v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Mon, 23 Nov 2020 17:23:16 +0100
branchv_0
changeset 8 83b23480d41f
parent 7 95b21edc9519
child 9 be61125d8ed1
emit also the section comments: e.g. „[section] ; comment“
src/INICommand.cpp
--- a/src/INICommand.cpp	Mon Nov 23 17:21:04 2020 +0100
+++ b/src/INICommand.cpp	Mon Nov 23 17:23:16 2020 +0100
@@ -114,6 +114,12 @@
 
 	void startSection(const SectionStartEvent& event) override {
 		currentSection.push_back(event.name);
+
+		if (configuration.enableComments && event.comment.size()) {
+			Record record(&event);
+			record.comment = event.comment;
+			write(record);
+		}
 	};
 
 	void endSection() override {