Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

properties: support "/" in property names #680

Merged
merged 1 commit into from
Jun 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lenses/properties.aug
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module Properties =
let indent = Util.indent
let backslash = del /[\\][ \t]*\n/ "\\\n"
let opt_backslash = del /([\\][ \t]*\n)?/ ""
let entry = /([^ \t\r\n:=\/!#\\]|[\\]:|[\\]=|[\\][\t ]|[\\][^\/\r\n])+/
let entry = /([^ \t\r\n:=!#\\]|[\\]:|[\\]=|[\\][\t ]|[\\][^\/\r\n])+/

let multi_line_entry =
[ indent . value_to_bs? . backslash ] .
Expand Down
6 changes: 6 additions & 0 deletions lenses/tests/test_properties.aug
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ key: value
key2:value2
key3 :value3
key4:=value4
key5\"=value5
key6/c=value6

long.description=this is a description that happens to span \
more than one line with a combination of tabs and \
Expand Down Expand Up @@ -66,6 +68,8 @@ test lns get conf =
{ "key2" = "value2" }
{ "key3" = "value3" }
{ "key4" = "=value4" }
{ "key5\"" = "value5" }
{ "key6/c" = "value6" }
{}
{ "long.description" = " < multi > "
{ = "this is a description that happens to span " }
Expand Down Expand Up @@ -118,6 +122,8 @@ key: value
key2:value2
key3 :value3
key4:=value4
key5\"=value5
key6/c=value6

long.description=this is a description that happens to span \
more than one line with a combination of tabs and \
Expand Down