# HG changeset patch # User František Kučera # Date 1632935793 -7200 # Node ID b4fbf2772cfda81124f421e78199ebe5b0aa9ebc # Parent 930f17f16fd70004963e0ee0709067b52b6c483a java-properties: comments can start also with „!“ diff -r 930f17f16fd7 -r b4fbf2772cfd src/lib/BasicUnescapingProcessor.h --- a/src/lib/BasicUnescapingProcessor.h Wed Sep 29 00:54:55 2021 +0200 +++ b/src/lib/BasicUnescapingProcessor.h Wed Sep 29 19:16:33 2021 +0200 @@ -38,7 +38,7 @@ if (i + 1 < length && ch == ESC) { ch = s[i + 1]; if (ch == 'n') put(result, '\n', i); - else if (ch == 'r') put(result, '\r', i); + else if (ch == 'r') put(result, '\r', i); // TODO: should be 0x0d, not 0x0a like \n else if (ch == 't') put(result, '\t', i); else if (ch == 's') put(result, ' ', i); // TODO: Reconsider what is „basic“ escaping and should be supported. else if (ch == '"') put(result, ch, i); // The delimiters (\n,]",') are already unescaped during the first stage in the INIReader while parsing (the delimiter relevant to given environment is unescaped, e.g. \" in "quoted" value). diff -r 930f17f16fd7 -r b4fbf2772cfd src/lib/JavaPropertiesDialect.h --- a/src/lib/JavaPropertiesDialect.h Wed Sep 29 00:54:55 2021 +0200 +++ b/src/lib/JavaPropertiesDialect.h Wed Sep 29 19:16:33 2021 +0200 @@ -34,7 +34,7 @@ reader.setOption(option::AllowSections, "false"); reader.setOption(option::AllowSectionTags, "false"); reader.setOption(option::AllowSubKeys, "false"); - reader.setOption(option::CommentSeparators, "#"); + reader.setOption(option::CommentSeparators, "#!"); reader.setOption(option::KeyValueSeparators, "="); reader.setOption(option::Quotes, ""); reader.setOption(option::AllowLineContinuationWithEscaping, "true");