Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
6 changed files
with
114 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,24 @@ | ||
foo = bar | ||
foo: bar | ||
foo.oof: \ | ||
bar=baz; \ | ||
asdf | ||
#https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Properties.htm | ||
# mixing spaces | ||
Truth = Beauty | ||
Truth:Beauty | ||
Truth Beauty | ||
Truth :Beauty | ||
|
||
! line continuations and escapes | ||
fruits apple, banana, pear, \ | ||
cantaloupe, watermelon, \ | ||
kiwi, mango | ||
key = \ | ||
value1 \\\ | ||
and value2\\ | ||
key\ 2 = value | ||
key\\ 3 = value3 | ||
|
||
// comment | ||
# comment | ||
; comment | ||
|
||
x:a\ | ||
b | ||
x: a \ | ||
b | ||
|
||
x = \ | ||
! empty keys and edge cases | ||
key1 = | ||
key2 | ||
key3 the value3 | ||
key4 the:value4 | ||
key5 the=value5 | ||
key6=the value6 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,5 @@ | |
# comment | ||
|
||
---tokens--- | ||
'# comment' Comment | ||
'# comment' Comment.Single | ||
'\n' Text.Whitespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters