From 60944023193d203f66b19ca87d0925b57c0cf3eb Mon Sep 17 00:00:00 2001 From: Marek Mihok Date: Mon, 28 Aug 2023 12:44:58 +0200 Subject: [PATCH] chore: use unique id for markdown codeblock #2025 --- ui/src/markdown.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/src/markdown.tsx b/ui/src/markdown.tsx index 52619f333f3..4a26096a011 100644 --- a/ui/src/markdown.tsx +++ b/ui/src/markdown.tsx @@ -91,9 +91,9 @@ const highlightSyntax = async (str: S, language: S, codeBlockId: S) => { const highlightedCode = language ? hljs.highlight(str, { language, ignoreIllegals: true }).value : hljs.highlightAuto(str).value - codeBlock.outerHTML = `${highlightedCode}` + codeBlock.outerHTML = `${highlightedCode}` - const cb = document.getElementById('codeblock') + const cb = document.getElementById(codeBlockId) if (cb) ReactDOM.render(, document.createElement('div')) }