StringTree: Respect quoted quotes

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2017-11-22 09:34:26 +01:00
commit 3d93d534db
3 changed files with 17 additions and 11 deletions

View file

@ -59,7 +59,7 @@ class CmdBeautify(TrimSourceCmd):
r = ''
indent = args.indent_assignments
for line in contents.splitlines(True):
m = re.match(r'^ *([a-zA-Z_][a-zA-Z0-9_]*)\s*([?+]*)(=)\s*(.*)', line)
m = re.match(r'^ *([a-zA-Z_][a-zA-Z0-9_]*)\s*([?+:]*)(=)\s*(.*)', line)
if m is None:
r += line
continue