We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b1f7199 + 6d81dc9 commit ccad5b8Copy full SHA for ccad5b8
src/pages/_utils.ts
@@ -233,6 +233,10 @@ export const escapeCodeTagsContent = (htmlString: string): string => {
233
const $ = load(htmlString);
234
// Loop through all <code> tags
235
$("code").each(function () {
236
+ // Don't escape code in multiline blocks, as these will already
237
+ // be escaped
238
+ if ($(this).parent().prop('tagName') === 'PRE') return;
239
+
240
// Get the current text and HTML inside the <code> tag
241
const currentHtml = $(this).html() ?? "";
242
// Use he to escape HTML entities
0 commit comments