diff --git a/server/rehype-hljs-var.ts b/server/rehype-hljs-var.ts index 11b0cb480f..52731043d8 100644 --- a/server/rehype-hljs-var.ts +++ b/server/rehype-hljs-var.ts @@ -93,7 +93,7 @@ export const rehypeVarInHLJS = ( el.type === "element" && el.children.length === 1 && el.children[0].type === "text" - ) || + ) && !(el.type === "text") ) { return [CONTINUE];