summaryrefslogtreecommitdiffstats
path: root/misc/ninja_syntax.py
diff options
context:
space:
mode:
Diffstat (limited to 'misc/ninja_syntax.py')
-rw-r--r--misc/ninja_syntax.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/misc/ninja_syntax.py b/misc/ninja_syntax.py
index 8673518..091e054 100644
--- a/misc/ninja_syntax.py
+++ b/misc/ninja_syntax.py
@@ -21,8 +21,11 @@ class Writer(object):
def newline(self):
self.output.write('\n')
- def comment(self, text):
- for line in textwrap.wrap(text, self.width - 2):
+ 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):
self.output.write('# ' + line + '\n')
def variable(self, key, value, indent=0):