Skip to content

Commit

Permalink
move things
Browse files Browse the repository at this point in the history
  • Loading branch information
huntabyte committed Jan 22, 2024
1 parent eec30ba commit 4d54b31
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions mdsvex.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,6 @@ export const mdsvexOptions = {
]
};

// The entities we want to escape in code blocks, along with their replacements.
const entities = [
[/</g, "&lt;"],
[/>/g, "&gt;"],
[/{/g, "&#123;"],
[/}/g, "&#125;"]
];

/**
* Removes `<!-- prettier-ignore -->` and `// prettier-ignore` from code blocks
* before they are converted to HTML for syntax highlighting.
Expand All @@ -115,6 +107,14 @@ function remarkRemovePrettierIgnore() {
};
}

// The entities we want to escape in code blocks, along with their replacements.
const entities = [
[/</g, "&lt;"],
[/>/g, "&gt;"],
[/{/g, "&#123;"],
[/}/g, "&#125;"]
];

/**
* Escapes code blocks so that they can be used within Svelte components.
*/
Expand Down Expand Up @@ -209,7 +209,6 @@ function rehypeRenderCode() {
);

codeEl.type = "raw";

codeEl.value = `{@html \`${escapeSvelte(codeString)}\`}`;
}
});
Expand Down

0 comments on commit 4d54b31

Please sign in to comment.