Skip to content

Commit d5cf4a6

Browse files
authored
fix(transformers): support more comment style for notation transformer (#745)
1 parent f308dc2 commit d5cf4a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/transformers/src/transformers/notation-map.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export function transformerNotationMap(
2424

2525
return createCommentNotationTransformer(
2626
name,
27-
new RegExp(`\\s*(?://|/\\*|<!--|#|--)\\s+\\[!code (${Object.keys(classMap).map(escapeRegExp).join('|')})(:\\d+)?\\]\\s*(?:\\*/|-->)?`),
27+
new RegExp(`\\s*(?://|/\\*|<!--|#|--|%{1,2}|;{1,2}|"|')\\s+\\[!code (${Object.keys(classMap).map(escapeRegExp).join('|')})(:\\d+)?\\]\\s*(?:\\*/|-->)?\\s*$`),
2828
function ([_, match, range = ':1'], _line, _comment, lines, index) {
2929
const lineNum = Number.parseInt(range.slice(1), 10)
3030
lines

0 commit comments

Comments
 (0)