mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fixed regex to account for comment character followed by whitespace
This commit is contained in:
parent
6383dd8a7d
commit
ba1a57e582
1 changed files with 1 additions and 1 deletions
|
@ -1087,7 +1087,7 @@ def comment_line(path,
|
|||
regex.lstrip('^').rstrip('$'),
|
||||
'$' if regex.endswith('$') else '')
|
||||
else:
|
||||
regex = '^{0}({1}){2}'.format(
|
||||
regex = r'^{0}\s*({1}){2}'.format(
|
||||
char,
|
||||
regex.lstrip('^').rstrip('$'),
|
||||
'$' if regex.endswith('$') else '')
|
||||
|
|
Loading…
Add table
Reference in a new issue