diff --git a/tools/lint-all b/tools/lint-all index 37ef3ffcd1..5df3d077ac 100755 --- a/tools/lint-all +++ b/tools/lint-all @@ -145,6 +145,14 @@ whitespace_rules = [ 'exclude': set(['zerver/lib/bugdown/codehilite.py']), 'description': 'Fix tab-based whitespace'}, ] +markdown_whitespace_rules = list([rule for rule in whitespace_rules if rule['pattern'] != '\s+$']) + [ + # Two spaces trailing a line with other content is okay--it's a markdown line break. + # This rule finds one space trailing a non-space, three or more trailing spaces, and + # spaces on an empty line. + {'pattern': '((?