Fixed regex to account for comment character followed by whitespace

This commit is contained in:
twangboy 2015-08-04 09:41:33 -06:00
parent 6383dd8a7d
commit ba1a57e582

View file

@ -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 '')