From a38cb38e93c9635240b3ae89d78d38cf182745da Mon Sep 17 00:00:00 2001 From: jmzambon Date: Sun, 25 Sep 2022 22:56:48 +0200 Subject: Fix: Issues with .properties format using whitespace delimited key (#2241) Added: - support for space delimitor in every case, included multiline value - check for odd number of backslash escapes - "!" as comment start - support for escape of spaces and separators Dropped: - undocumented ";" and "//" comment start --- tests/snippets/properties/test_comments.txt | 4 ++-- tests/snippets/properties/test_leading_whitespace_comments.txt | 2 +- tests/snippets/properties/test_space_delimited_kv_pair.txt | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'tests/snippets') diff --git a/tests/snippets/properties/test_comments.txt b/tests/snippets/properties/test_comments.txt index b6bc8fb9..9bc65860 100644 --- a/tests/snippets/properties/test_comments.txt +++ b/tests/snippets/properties/test_comments.txt @@ -5,8 +5,8 @@ # also a comment ---tokens--- -'! a comment' Comment +'! a comment' Comment.Single '\n' Text.Whitespace -'# also a comment' Comment +'# also a comment' Comment.Single '\n' Text.Whitespace diff --git a/tests/snippets/properties/test_leading_whitespace_comments.txt b/tests/snippets/properties/test_leading_whitespace_comments.txt index be77792b..3a36afc9 100644 --- a/tests/snippets/properties/test_leading_whitespace_comments.txt +++ b/tests/snippets/properties/test_leading_whitespace_comments.txt @@ -2,5 +2,5 @@ # comment ---tokens--- -'# comment' Comment +'# comment' Comment.Single '\n' Text.Whitespace diff --git a/tests/snippets/properties/test_space_delimited_kv_pair.txt b/tests/snippets/properties/test_space_delimited_kv_pair.txt index fe12d48e..98961e42 100644 --- a/tests/snippets/properties/test_space_delimited_kv_pair.txt +++ b/tests/snippets/properties/test_space_delimited_kv_pair.txt @@ -4,4 +4,5 @@ key value ---tokens--- 'key' Name.Attribute ' ' Text.Whitespace -'value\n' Literal.String +'value' Literal.String +'\n' Text.Whitespace -- cgit v1.2.1