Skip to content

Commit b17950f

Browse files
authored
Fix #2281; Do not process templates when not processing tools (#2282)
1 parent 6d5396c commit b17950f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

lib/src/model/comment_processable.dart

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,15 @@ mixin CommentProcessable on Documentable, Warnable, Locatable, SourceCodeMixin {
3535
/// `{@}`-style directives, except `{@tool}`, returning the processed result.
3636
String processCommentWithoutTools(String documentationComment) {
3737
var docs = stripComments(documentationComment);
38-
docs = processCommentDirectives(docs);
38+
if (!docs.contains('{@')) {
39+
return docs;
40+
}
41+
docs = _injectExamples(docs);
42+
docs = _injectYouTube(docs);
43+
docs = _injectAnimations(docs);
44+
// TODO(srawlins): Processing templates here causes #2281. But leaving them
45+
// unprocessed causes #2272.
46+
docs = _stripHtmlAndAddToIndex(docs);
3947
return docs;
4048
}
4149

0 commit comments

Comments
 (0)