From 334584ecef68dba5cfa149daa684796abe883d34 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Mon, 26 Dec 2022 18:04:49 +0800 Subject: [PATCH] Fix HTML inside code blocks being rendered --- src/utils/enhance-content.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/enhance-content.js b/src/utils/enhance-content.js index 152df8a8..637b92ab 100644 --- a/src/utils/enhance-content.js +++ b/src/utils/enhance-content.js @@ -39,7 +39,7 @@ function enhanceContent(content, opts = {}) { const pre = document.createElement('pre'); // Replace
with newlines block.querySelectorAll('br').forEach((br) => br.replaceWith('\n')); - pre.innerHTML = `${block.innerText.trim()}`; + pre.innerHTML = `${block.innerHTML.trim()}`; block.replaceWith(pre); });