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

Unified Diff: pkg/analysis_server/tool/spec/to_html.dart

Issue 468563003: Use hanging indentation when code generating Javadoc @params. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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 | « pkg/analysis_server/tool/spec/text_formatter.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/tool/spec/to_html.dart
diff --git a/pkg/analysis_server/tool/spec/to_html.dart b/pkg/analysis_server/tool/spec/to_html.dart
index 5e9c397490fe0ce18461ff686f872def86fa3347..a1d53222c64e0b6a82cf120ad11b486e92eb71ee 100644
--- a/pkg/analysis_server/tool/spec/to_html.dart
+++ b/pkg/analysis_server/tool/spec/to_html.dart
@@ -38,6 +38,10 @@ dt {
margin-top: 1em;
margin-bottom: 1em;
}
+div.hangingIndent {
+ padding-left: 3em;
+ text-indent: -3em;
+}
'''.trim();
/**
@@ -76,6 +80,9 @@ abstract class HtmlMixin {
void h2(void callback()) => element('h2', {}, callback);
void h3(void callback()) => element('h3', {}, callback);
void h4(void callback()) => element('h4', {}, callback);
+ void hangingIndent(void callback()) => element('div', {
+ 'class': 'hangingIndent'
+ }, callback);
void head(void callback()) => element('head', {}, callback);
void html(void callback()) => element('html', {}, callback);
void i(void callback()) => element('i', {}, callback);
@@ -402,9 +409,10 @@ class ToHtmlVisitor extends HierarchicalApiVisitor with HtmlMixin, HtmlGenerator
void javadocParams(TypeObject typeObject) {
if (typeObject != null) {
for (TypeObjectField field in typeObject.fields) {
- write('@param ${field.name} ');
- translateHtml(field.html, squashParagraphs: true);
- br();
+ hangingIndent(() {
+ write('@param ${field.name} ');
+ translateHtml(field.html, squashParagraphs: true);
+ });
}
}
}
« no previous file with comments | « pkg/analysis_server/tool/spec/text_formatter.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698