Skip to content

Commit 5938541

Browse files
committed
fix(transformer): update regex to support additional color tag formats
1 parent 4e2f79f commit 5938541

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/command-transformer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function detectRanges(code: string): MetaRanges {
2121
const contents: ColorContentRange[] = []
2222
const hides: HideRange[] = []
2323

24-
const re = /<([A-Za-z]+)>([\s\S]*?)<\/\1>/g
24+
const re = /<([A-Za-z_+-]+)>([\s\S]*?)<\/\1>/g
2525
let match: RegExpExecArray | null
2626
while ((match = re.exec(code)) !== null) {
2727
const [full, colorName, inner] = match

0 commit comments

Comments
 (0)