Commit 0d89c591 authored by Michal Čihař's avatar Michal Čihař

Make EndSpaceCheck count spaces as well

parent 593ed2ac
......@@ -408,7 +408,13 @@ class EndSpaceCheck(TargetCheck):
return False
if source[-1] in [':', '!', '?'] and target[-1] == ' ':
return False
return self.check_chars(source, target, -1, [' '])
# Count space chars in source and target
source_space = len(source) - len(source.rstrip(' '))
target_space = len(target) - len(target.rstrip(' '))
# Compare numbers
return (source_space != target_space)
class EndStopCheck(TargetCheck):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment