Index: pkg/analyzer/test/generated/parser_test.dart |
diff --git a/pkg/analyzer/test/generated/parser_test.dart b/pkg/analyzer/test/generated/parser_test.dart |
index 8a077a154563b2b00714ad7293918d5b0aebb28b..8b70f868227ff563a4805bc9f364fe0bcc85e4f2 100644 |
--- a/pkg/analyzer/test/generated/parser_test.dart |
+++ b/pkg/analyzer/test/generated/parser_test.dart |
@@ -6778,6 +6778,30 @@ void'''); |
expect(reference.offset, 24); |
} |
+ void test_parseCommentReferences_skipCodeBlock_gitHub() { |
+ List<DocumentationCommentToken> tokens = <DocumentationCommentToken>[ |
+ new DocumentationCommentToken( |
+ TokenType.MULTI_LINE_COMMENT, "/** `a[i]` and [b] */", 0) |
+ ]; |
+ List<CommentReference> references = |
+ parse("parseCommentReferences", <Object>[tokens], ""); |
+ expect(references, hasLength(1)); |
+ CommentReference reference = references[0]; |
+ expect(reference, isNotNull); |
+ expect(reference.identifier, isNotNull); |
+ expect(reference.offset, 16); |
+ } |
+ |
+ void test_parseCommentReferences_skipCodeBlock_gitHub_notTerminated() { |
+ List<DocumentationCommentToken> tokens = <DocumentationCommentToken>[ |
+ new DocumentationCommentToken( |
+ TokenType.MULTI_LINE_COMMENT, "/** `a[i] and [b] */", 0) |
+ ]; |
+ List<CommentReference> references = |
+ parse("parseCommentReferences", <Object>[tokens], ""); |
+ expect(references, hasLength(2)); |
+ } |
+ |
void test_parseCommentReferences_skipCodeBlock_spaces() { |
List<DocumentationCommentToken> tokens = <DocumentationCommentToken>[ |
new DocumentationCommentToken(TokenType.MULTI_LINE_COMMENT, |