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, |