From 39d96f22a09bd6df7fb0e52a4be7fea5bd960da2 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Sat, 2 Sep 2023 20:49:25 +0800 Subject: [PATCH] Make code blocks focusable --- 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 1a6d70ce..faea7cc1 100644 --- a/src/utils/enhance-content.js +++ b/src/utils/enhance-content.js @@ -120,7 +120,7 @@ function enhanceContent(content, opts = {}) { p.querySelectorAll('br').forEach((br) => br.replaceWith('\n')); }); const codeText = nextParagraphs.map((p) => p.innerHTML).join('\n\n'); - pre.innerHTML = `${codeText}`; + pre.innerHTML = `${codeText}`; block.replaceWith(pre); nextParagraphs.forEach((p) => p.remove()); }