From 63261112e0fbd4f8b832fa8fcf1573a669d2f673 Mon Sep 17 00:00:00 2001 From: naipaka Date: Wed, 11 Dec 2024 09:27:11 +0900 Subject: [PATCH] feat: Prevent wrapping of existing macro template documentation comments --- .../assists/wrap_with_macro_template_document_comment.dart | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/altive_lints/lib/src/assists/wrap_with_macro_template_document_comment.dart b/packages/altive_lints/lib/src/assists/wrap_with_macro_template_document_comment.dart index 1dcaa64..028af23 100644 --- a/packages/altive_lints/lib/src/assists/wrap_with_macro_template_document_comment.dart +++ b/packages/altive_lints/lib/src/assists/wrap_with_macro_template_document_comment.dart @@ -56,6 +56,12 @@ class WrapWithMacroTemplateDocumentComment extends DartAssist { return; } + final currentComment = node.tokens.join(); + if (currentComment.contains('{@template') && + currentComment.contains('{@endtemplate}')) { + return; + } + if (!node.isDocumentation) { return; }