diff options
author | Alex Vallée <avallee@google.com> | 2015-11-27 21:09:34 (GMT) |
---|---|---|
committer | Alex Vallée <avallee@google.com> | 2015-11-27 21:09:34 (GMT) |
commit | 97e96284a3cec71b8cf78a3bec5b525cc3e538bd (patch) | |
tree | 42c6637a8c2e732011860660ba366a49e606c9b9 /misc/ninja_syntax.py | |
parent | 8c18cf97ff0ff2a6347865443052913c598d7ee6 (diff) | |
download | Ninja-97e96284a3cec71b8cf78a3bec5b525cc3e538bd.zip Ninja-97e96284a3cec71b8cf78a3bec5b525cc3e538bd.tar.gz Ninja-97e96284a3cec71b8cf78a3bec5b525cc3e538bd.tar.bz2 |
Disable long word wrapping entirely in comments.
As pointed out by nico, we should unconditionally disable breaking of
long words in comments. It is unlikely long words that are in comments
should be split (like pathnames).
Diffstat (limited to 'misc/ninja_syntax.py')
-rw-r--r-- | misc/ninja_syntax.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/misc/ninja_syntax.py b/misc/ninja_syntax.py index f285420..73d2209 100644 --- a/misc/ninja_syntax.py +++ b/misc/ninja_syntax.py @@ -22,10 +22,8 @@ class Writer(object): self.output.write('\n') def comment(self, text, has_path=False): - args = {} - if has_path: - args['break_long_words'] = args['break_on_hyphens'] = False - for line in textwrap.wrap(text, self.width - 2, **args): + for line in textwrap.wrap(text, self.width - 2, break_long_words=False, + break_on_hyphens=False): self.output.write('# ' + line + '\n') def variable(self, key, value, indent=0): |