diff --git a/mdsvex.config.js b/mdsvex.config.js index e0ce223..9be08de 100644 --- a/mdsvex.config.js +++ b/mdsvex.config.js @@ -84,14 +84,6 @@ export const mdsvexOptions = { ] }; -// The entities we want to escape in code blocks, along with their replacements. -const entities = [ - [//g, ">"], - [/{/g, "{"], - [/}/g, "}"] -]; - /** * Removes `` and `// prettier-ignore` from code blocks * before they are converted to HTML for syntax highlighting. @@ -115,6 +107,14 @@ function remarkRemovePrettierIgnore() { }; } +// The entities we want to escape in code blocks, along with their replacements. +const entities = [ + [//g, ">"], + [/{/g, "{"], + [/}/g, "}"] +]; + /** * Escapes code blocks so that they can be used within Svelte components. */ @@ -209,7 +209,6 @@ function rehypeRenderCode() { ); codeEl.type = "raw"; - codeEl.value = `{@html \`${escapeSvelte(codeString)}\`}`; } });