Skip to content

Commit

Permalink
fix: support multiple overridden syntax themes (shuding#1992)
Browse files Browse the repository at this point in the history
Co-authored-by: Dimitri POSTOLOV <dmytropostolov@gmail.com>
Co-authored-by: Dimitri POSTOLOV <en3m@ya.ru>
  • Loading branch information
3 people committed Aug 19, 2023
1 parent 586df28 commit 874eeb0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/mdx-plugins/rehype.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ function visit(node, tagNames, handler) {
handler(node)
return
}
node.children?.forEach(n => visit(n, tagNames, handler))
if ('children' in node) {
for (const n of node.children) {
visit(n, tagNames, handler)
}
}
}

export const parseMeta =
Expand Down

0 comments on commit 874eeb0

Please sign in to comment.