Merge "Remove whitespace before comments"
This commit is contained in:
commit
c391bd0351
@ -216,8 +216,8 @@ class ConfigTemplateParser(ConfigParser.RawConfigParser):
|
||||
comments.append('')
|
||||
continue
|
||||
|
||||
if line[0] in '#;':
|
||||
comments.append(line)
|
||||
if line.lstrip()[0] in '#;':
|
||||
comments.append(line.lstrip())
|
||||
continue
|
||||
|
||||
if line.split(None, 1)[0].lower() == 'rem' and line[0] in "rR":
|
||||
|
@ -1,3 +1,4 @@
|
||||
# This comment tests bug 1755821
|
||||
# A default section comment
|
||||
# broken into multiple lines
|
||||
[DEFAULT]
|
||||
|
@ -239,6 +239,8 @@
|
||||
that:
|
||||
- "(lookup('ini', 'new_key section=DEFAULT file=/tmp/test_with_comments.ini')) == 'new_value'"
|
||||
- "(lookup('ini', 'baz section=foo file=/tmp/test_with_comments.ini')) == 'bar'"
|
||||
- "{{ ini_file.content | b64decode | search('# This comment tests bug 1755821')}}"
|
||||
- "{{ not(ini_file.content | b64decode | search(' # This comment tests bug 1755821'))}}"
|
||||
- "{{ ini_file.content | b64decode | search('#This is a comment')}}"
|
||||
- "{{ ini_file.content | b64decode | search('# A default section comment\n# broken into multiple lines\n\\[DEFAULT\\]')}}"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user