Skip to content

Commit

Permalink
fix(transformers): allow SQL comment syntax in notation transformer, fix
Browse files Browse the repository at this point in the history
  • Loading branch information
senicko authored Apr 15, 2024
1 parent fc33b7f commit cc13539
Show file tree
Hide file tree
Showing 3 changed files with 13 additions 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*(?://|/\\*|<!--|#|--)\\s+\\[!code (${Object.keys(classMap).map(escapeRegExp).join('|')})(:\\d+)?\\]\\s*(?:\\*/|-->)?`),
function ([_, match, range = ':1'], _line, _comment, lines, index) {
const lineNum = Number.parseInt(range.slice(1), 10)
lines
Expand Down
5 changes: 5 additions & 0 deletions packages/transformers/test/fixtures/highlight/query.sql

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cc13539

Please sign in to comment.