From 57657eadd03e0f3242500e6ae4eedc9a133f5ae0 Mon Sep 17 00:00:00 2001 From: Quinn Blenkinsop Date: Mon, 10 Aug 2020 22:13:39 -0700 Subject: [PATCH] Preserve syntax highlighting when exporting png that contains %XX (#1069) --- components/Editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/Editor.js b/components/Editor.js index f457539..05836c8 100644 --- a/components/Editor.js +++ b/components/Editor.js @@ -136,7 +136,7 @@ class Editor extends React.Component { if (node.innerText && node.innerText.match(/%[A-Fa-f0-9]{2}/)) { map.set(node, node.innerHTML) node.innerText.match(/%[A-Fa-f0-9]{2}/g).forEach(t => { - node.innerText = node.innerText.replace(t, encodeURIComponent(t)) + node.innerHTML = node.innerHTML.replace(t, encodeURIComponent(t)) }) } })