Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Unified Diff: tools/json_schema_compiler/code.py

Issue 1513573012: Fix line wrapping in json_schema_compiler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Generate -> Append Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/json_schema_compiler/js_externs_generator.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/code.py
diff --git a/tools/json_schema_compiler/code.py b/tools/json_schema_compiler/code.py
index d637026d6d0db88aaf950ac5d0dc9c673fbc4929..ef41cf88407280fa2cfdf55138ed1b65b452f1f2 100644
--- a/tools/json_schema_compiler/code.py
+++ b/tools/json_schema_compiler/code.py
@@ -131,7 +131,7 @@ class Code(object):
else:
line = comment[0:max_len]
comment = comment[max_len:]
- return line, comment
+ return line, comment.lstrip()
# First line has the full maximum length.
if not new_line and self._code:
@@ -174,7 +174,7 @@ class Code(object):
return self
def TrimTrailingNewlines(self):
- """Trims any trailing newlines.
+ """Removes any trailing empty Line objects.
"""
while self._code:
if self._code[-1].value != '':
« no previous file with comments | « no previous file | tools/json_schema_compiler/js_externs_generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698