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 b603f1f7139c2dc6c96f6cc5abfa232b86155334..219e1ee6e482320acd08651cfe9ba65d77e74ead 100644 |
--- a/pkg/analyzer/lib/src/task/html.dart |
+++ b/pkg/analyzer/lib/src/task/html.dart |
@@ -360,12 +360,7 @@ class ParseHtmlTask extends SourceBasedAnalysisTask { |
* Compute [LineInfo] for the given [content]. |
*/ |
static LineInfo _computeLineInfo(String content) { |
- List<int> lineStarts = <int>[0]; |
- for (int index = 0; index < content.length; index++) { |
- if (content.codeUnitAt(index) == 0x0A) { |
- lineStarts.add(index + 1); |
- } |
- } |
+ List<int> lineStarts = StringUtilities.computeLineStarts(content); |
return new LineInfo(lineStarts); |
} |
} |