Skip to content

Commit

Permalink
Added support for empty quoted keys
Browse files Browse the repository at this point in the history
  • Loading branch information
lasa01 committed Dec 3, 2020
1 parent ecac10d commit 90648a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vdf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def parse(fp, mapper=dict, merge_duplicate_keys=True, escaped=True):
stack = [mapper()]
expect_bracket = False

re_keyvalue = re.compile(r'^("(?P<qkey>(?:\\.|[^\\"])+)"|(?P<key>#?[a-z0-9\-\_\\\?$%<>]+))'
re_keyvalue = re.compile(r'^("(?P<qkey>(?:\\.|[^\\"])*)"|(?P<key>#?[a-z0-9\-\_\\\?$%<>]+))'
r'([ \t]*('
r'"(?P<qval>(?:\\.|[^\\"])*)(?P<vq_end>")?'
r'|(?P<val>(?:(?<!/)/(?!/)|[a-z0-9\-\_\\\?\*\.$<> ])+)'
Expand Down

0 comments on commit 90648a8

Please sign in to comment.