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

Unified Diff: pkg/analyzer/lib/src/task/html.dart

Issue 1395033003: Ignore absence of DOCTYPE in HTML files. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 | « no previous file | pkg/analyzer/test/src/context/context_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/task/html.dart
diff --git a/pkg/analyzer/lib/src/task/html.dart b/pkg/analyzer/lib/src/task/html.dart
index 0ab546a9c56b0653417ba65cb0f6456378d1b628..1804c50f7d3f7a8f3e9738c789321c736ff04807 100644
--- a/pkg/analyzer/lib/src/task/html.dart
+++ b/pkg/analyzer/lib/src/task/html.dart
@@ -322,6 +322,9 @@ class ParseHtmlTask extends SourceBasedAnalysisTask {
List<ParseError> parseErrors = parser.errors;
List<AnalysisError> errors = <AnalysisError>[];
for (ParseError parseError in parseErrors) {
+ if (parseError.errorCode == 'expected-doctype-but-got-start-tag') {
+ continue;
+ }
SourceSpan span = parseError.span;
errors.add(new AnalysisError(target.source, span.start.offset,
span.length, HtmlErrorCode.PARSE_ERROR, [parseError.message]));
« no previous file with comments | « no previous file | pkg/analyzer/test/src/context/context_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698