Chromium Code Reviews| Index: pkg/analyzer/lib/src/generated/parser.dart |
| diff --git a/pkg/analyzer/lib/src/generated/parser.dart b/pkg/analyzer/lib/src/generated/parser.dart |
| index a30590015e6d572203c8f1668268a30a0194ade0..7c258761bd5f659ea495b558856961c8f056b0f9 100644 |
| --- a/pkg/analyzer/lib/src/generated/parser.dart |
| +++ b/pkg/analyzer/lib/src/generated/parser.dart |
| @@ -3886,6 +3886,16 @@ class Parser { |
| ranges.add(<int>[index, end]); |
| index = end; |
| } |
| + } else if (StringUtilities.startsWith5( |
| + comment, index, 0x20, 0x20, 0x20, 0x20, 0x20)) { |
|
Brian Wilkerson
2015/12/16 21:23:33
That looks like five spaces to me. (If we only req
scheglov
2015/12/16 21:27:06
According to
https://www.dartlang.org/effective-da
Brian Wilkerson
2015/12/16 21:35:02
Given the example you showed me earlier, it's poss
scheglov
2015/12/16 22:28:18
Acknowledged.
|
| + int end = index + 5; |
| + while (end < length && |
| + comment.codeUnitAt(end) != 0xD && |
| + comment.codeUnitAt(end) != 0xA) { |
| + end = end + 1; |
| + } |
| + ranges.add(<int>[index, end]); |
| + index = end; |
| } else if (index + 1 < length && |
| currentChar == 0x5B && |
| comment.codeUnitAt(index + 1) == 0x3A) { |
| @@ -5043,7 +5053,7 @@ class Parser { |
| List<CommentReference> references = new List<CommentReference>(); |
| for (DocumentationCommentToken token in tokens) { |
| String comment = token.lexeme; |
| - comment = _removeGitHubCodeBlocks(comment); |
| + comment = _removeCodeBlocksGitHub(comment); |
| int length = comment.length; |
| List<List<int>> codeBlockRanges = _getCodeBlockRanges(comment); |
| int leftIndex = comment.indexOf('['); |
| @@ -8233,7 +8243,7 @@ class Parser { |
| return token; |
| } |
| - String _removeGitHubCodeBlocks(String comment) { |
| + String _removeCodeBlocksGitHub(String comment) { |
| int index = 0; |
| while (true) { |
| int beginIndex = comment.indexOf('`', index); |