fix: render katex (#253)

This commit is contained in:
YangQi 2023-11-07 18:49:41 -06:00 committed by GitHub
parent effb43d7d9
commit 0fba96465a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -343,7 +343,13 @@ export default {
clipboardDiv.innerHTML = mergeCss(clipboardDiv.innerHTML)
// katex
clipboardDiv.innerHTML = clipboardDiv.innerHTML.replace(/class="base"( style="display: inline")*/g, `class="base" style="display: inline"`)
clipboardDiv.innerHTML = clipboardDiv.innerHTML
.replace(
/class="base"( style="display: inline")*/g,
`class="base" style="display: inline"`
)
// position translateY
.replace(/top:(.*?)em/g, `transform: translateY($1em)`)
if (this.isMacCodeBlock) {
clipboardDiv.innerHTML = clipboardDiv.innerHTML.replaceAll(