Skip to content

Commit

Permalink
properties: support "/" in property names
Browse files Browse the repository at this point in the history
  • Loading branch information
felixdoerre committed Jun 12, 2020
1 parent 3cb0f4e commit 0779993
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
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
4 changes: 4 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

0 comments on commit 0779993

Please sign in to comment.