Skip to content

Commit

Permalink
Update src/runtime/markdown-parser/handler/utils.ts
Browse files Browse the repository at this point in the history
Co-authored-by: nobkd <[email protected]>
  • Loading branch information
Barbapapazes and nobkd authored Jul 15, 2023
1 parent 8d110cb commit 28707f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/markdown-parser/handler/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function parseThematicBlock (lang: string) {

const languageMatches = lang.replace(/[{|[](.+)/, '').match(/^[^ \t]+(?=[ \t]|$)/)
const highlightTokensMatches = lang.match(/{([^}]*)}/)
const filenameMatches = lang.match(/\[((\S)*)\]/) /** Allow ']' in filename. */
const filenameMatches = lang.match(\[((\\]|[^\]])*)\]/)
const meta = lang
.replace(languageMatches?.[0] ?? '', '')
.replace(highlightTokensMatches?.[0] ?? '', '')
Expand Down

0 comments on commit 28707f5

Please sign in to comment.