This repository was archived by the owner on Jul 16, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## Unreleased
4+
5+ * fix: correctly support dartdoc tags for [ ` format-comment ` ] ( https://dcm.dev/docs/individuals/rules/common/format-comment ) .
6+
37## 5.6.0-dev.1
48
59* docs: remove old website
Original file line number Diff line number Diff line change @@ -3,8 +3,7 @@ part of 'format_comment_rule.dart';
33const _punctuation = ['.' , '!' , '?' , ':' ];
44
55final _sentencesRegExp = RegExp (r'(?<=([\.|:](?=\s|\n|$)))' );
6- final _regMacrosExp = RegExp ('{@(template|macro) .+}' );
7- const _macrosEndExp = '{@endtemplate}' ;
6+ final _regMacrosExp = RegExp ('{@.+}' );
87const _ignoreExp = 'ignore:' ;
98const _ignoreForFileExp = 'ignore_for_file:' ;
109
@@ -141,16 +140,14 @@ class _Visitor extends RecursiveAstVisitor<void> {
141140 final trimmed = text.trim ();
142141
143142 return _regMacrosExp.hasMatch (text) ||
144- text.contains (_macrosEndExp) ||
145143 _isIgnoreComment (trimmed) ||
146144 _isIgnoredPattern (trimmed);
147145 }
148146
149147 bool _isIgnoreComment (String text) =>
150148 text.startsWith (_ignoreExp) || text.startsWith (_ignoreForFileExp);
151149
152- bool _isMacros (String text) =>
153- _regMacrosExp.hasMatch (text) || text == _macrosEndExp;
150+ bool _isMacros (String text) => _regMacrosExp.hasMatch (text);
154151
155152 bool _isIgnoredPattern (String text) =>
156153 _ignoredPatterns.any ((regExp) => regExp.hasMatch (text));
Original file line number Diff line number Diff line change @@ -28,3 +28,6 @@ void f3() {}
2828
2929/// {@template my_project.my_class.my_method}
3030void f4 () {}
31+
32+ /// {@nodoc}
33+ void f5 () {}
You can’t perform that action at this time.
0 commit comments