Skip to content

Commit

Permalink
fix: no match when label tag already have data-title attr
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyinws committed Aug 24, 2024
1 parent b45486d commit 6481ed0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/markdown.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type Markdown from 'markdown-it'

export function groupIconMdPlugin(md: Markdown) {
const labelRE = /<label\b[^>]*>(.*?)<\/label>/g
const labelRE = /<label\b(?![^>]+\bdata-title\b)[^>]*>(.*?)<\/label>/g

type RenderRuleParams = Parameters<NonNullable<typeof md.renderer.rules['container_code-group_open']>>

Expand Down

0 comments on commit 6481ed0

Please sign in to comment.