Skip to content

Commit

Permalink
fix(transformers): support more comment style for notation transformer (
Browse files Browse the repository at this point in the history
  • Loading branch information
sharpchen committed Aug 17, 2024
1 parent f308dc2 commit d5cf4a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/transformers/src/transformers/notation-map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function transformerNotationMap(

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

0 comments on commit d5cf4a6

Please sign in to comment.