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

Unified Diff: tools/json_schema_compiler/js_externs_generator.py

Issue 1010603007: [Extension API Extern Generation] Fix comment indentation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: True 80 char limit Created 5 years, 9 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 | « tools/json_schema_compiler/code_test.py ('k') | tools/json_schema_compiler/js_externs_generator_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/js_externs_generator.py
diff --git a/tools/json_schema_compiler/js_externs_generator.py b/tools/json_schema_compiler/js_externs_generator.py
index 8512ac4661aef6b0f8b826f09232cd9ba1eedcb3..587c04e64384dc94c39fe5751440bc25cd1df97e 100644
--- a/tools/json_schema_compiler/js_externs_generator.py
+++ b/tools/json_schema_compiler/js_externs_generator.py
@@ -94,7 +94,7 @@ class _Generator(object):
is_constructor = self._IsTypeConstructor(js_type)
if is_constructor:
- c.Comment('@constructor', comment_prefix = ' * ')
+ c.Comment('@constructor', comment_prefix = ' * ', wrap_indent=4)
else:
c.Concat(self._GenerateTypedef(js_type.properties))
@@ -141,7 +141,8 @@ class _Generator(object):
lines = []
if function.description:
- lines.extend(function.description.splitlines())
+ for line in function.description.splitlines():
+ c.Comment(line, comment_prefix=' * ')
for param in function.params:
js_type = self._TypeToJsType(param.type_)
@@ -165,7 +166,7 @@ class _Generator(object):
lines.append('@deprecated %s' % function.deprecated)
for line in lines:
- c.Comment(line, comment_prefix=' * ');
+ c.Comment(line, comment_prefix=' * ', wrap_indent=4);
c.Append(' */')
return c
« no previous file with comments | « tools/json_schema_compiler/code_test.py ('k') | tools/json_schema_compiler/js_externs_generator_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698