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

Side by Side Diff: pkg/analysis_server/tool/spec/to_html.dart

Issue 1351323004: Add '<!doctype html>' to spec. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « pkg/analysis_server/tool/spec/spec_input.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * Code for displaying the API as HTML. This is used both for generating a 6 * Code for displaying the API as HTML. This is used both for generating a
7 * full description of the API as a web page, and for generating doc comments 7 * full description of the API as a web page, and for generating doc comments
8 * in generated code. 8 * in generated code.
9 */ 9 */
10 library to.html; 10 library to.html;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 -webkit-margin-start: 0px; 77 -webkit-margin-start: 0px;
78 -webkit-padding-start: 0px; 78 -webkit-padding-start: 0px;
79 79
80 list-style-type: none; 80 list-style-type: none;
81 } 81 }
82 '''.trim(); 82 '''.trim();
83 83
84 final GeneratedFile target = new GeneratedFile('../../doc/api.html', () { 84 final GeneratedFile target = new GeneratedFile('../../doc/api.html', () {
85 ToHtmlVisitor visitor = new ToHtmlVisitor(readApi()); 85 ToHtmlVisitor visitor = new ToHtmlVisitor(readApi());
86 dom.Document document = new dom.Document(); 86 dom.Document document = new dom.Document();
87 document.append(new dom.DocumentType('html', null, null));
87 for (dom.Node node in visitor.collectHtml(visitor.visitApi)) { 88 for (dom.Node node in visitor.collectHtml(visitor.visitApi)) {
88 document.append(node); 89 document.append(node);
89 } 90 }
90 return document.outerHtml; 91 return document.outerHtml;
91 }); 92 });
92 93
93 /** 94 /**
94 * Translate spec_input.html into api.html. 95 * Translate spec_input.html into api.html.
95 */ 96 */
96 main() { 97 main() {
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 bool verticalBarNeeded = false; 702 bool verticalBarNeeded = false;
702 for (TypeDecl choice in typeUnion.choices) { 703 for (TypeDecl choice in typeUnion.choices) {
703 if (verticalBarNeeded) { 704 if (verticalBarNeeded) {
704 write(' | '); 705 write(' | ');
705 } 706 }
706 visitTypeDecl(choice); 707 visitTypeDecl(choice);
707 verticalBarNeeded = true; 708 verticalBarNeeded = true;
708 } 709 }
709 } 710 }
710 } 711 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/tool/spec/spec_input.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698