Merge pull request #26002 from twangboy/fix_25948

Fixed regex to account for comment character followed by whitespace
This commit is contained in:
Justin Findlay 2015-08-04 16:28:11 -06:00
commit c168159750

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