Preserve syntax highlighting when exporting png that contains %XX (#1069)

main
Quinn Blenkinsop 4 years ago committed by GitHub
parent 32ed3dbceb
commit 57657eadd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -136,7 +136,7 @@ class Editor extends React.Component {
if (node.innerText && node.innerText.match(/%[A-Fa-f0-9]{2}/)) { if (node.innerText && node.innerText.match(/%[A-Fa-f0-9]{2}/)) {
map.set(node, node.innerHTML) map.set(node, node.innerHTML)
node.innerText.match(/%[A-Fa-f0-9]{2}/g).forEach(t => { 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))
}) })
} }
}) })

Loading…
Cancel
Save