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

Unified Diff: pkg/analysis_server/tool/spec/from_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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analysis_server/doc/api.html ('k') | pkg/analysis_server/tool/spec/spec_input.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/tool/spec/from_html.dart
diff --git a/pkg/analysis_server/tool/spec/from_html.dart b/pkg/analysis_server/tool/spec/from_html.dart
index c3e3010c70b7a016f22f61bcb9ee86eb83060b5f..1ae94254308225ba589857c5b9dde1bb1efb66ac 100644
--- a/pkg/analysis_server/tool/spec/from_html.dart
+++ b/pkg/analysis_server/tool/spec/from_html.dart
@@ -293,7 +293,9 @@ Api readApi() {
File htmlFile = new File('spec_input.html');
String htmlContents = htmlFile.readAsStringSync();
dom.Document document = parser.parse(htmlContents);
- return apiFromHtml(document.firstChild);
+ dom.Element htmlElement = document.children
+ .singleWhere((element) => element.localName.toLowerCase() == 'html');
+ return apiFromHtml(htmlElement);
}
void recurse(dom.Element parent, String context,
« no previous file with comments | « pkg/analysis_server/doc/api.html ('k') | pkg/analysis_server/tool/spec/spec_input.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698