fix: 修复表格显示问题
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
CI / CI OK (push) Has been cancelled
Deploy Website on push / Rerun on failure (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
Close stale issues / stale (push) Has been cancelled

This commit is contained in:
阿梦 2026-05-19 20:29:28 +09:00
parent 6724e83beb
commit 6a32ff3030
2 changed files with 14 additions and 3 deletions

View File

@ -20,12 +20,20 @@ const regex_tag = /(<span data-.+?="[^"]*"><\/span>)/g
// HTML $a<b$ <b
const regex_html = /(<\/?[a-zA-Z][a-zA-Z0-9]*(?:\s+[^>]*)?\s*>)/g
const regex_html_entity = /&(?:#(?:\d+|x[\da-f]+)|[a-z][\da-z]*);/gi
function escapeHtml(text: string) {
return text
const entities: string[] = []
const protectedText = text.replace(regex_html_entity, (entity) => {
entities.push(entity)
return `\uE000${entities.length - 1}\uE001`
})
return protectedText
.replaceAll('&', '&amp;')
.replaceAll('<', '&lt;')
.replaceAll('>', '&gt;')
.replaceAll('"', '&quot;')
.replace(/\uE000(\d+)\uE001/g, (_, index) => entities[Number(index)]!)
}
function addLatexText(list: any[], text: string) {

View File

@ -770,10 +770,13 @@ const handleEditSave = async () => {
.qml-bk {
display: inline-block;
line-height: 0.8;
min-width: 2em;
padding: 0 2px;
line-height: inherit;
vertical-align: baseline;
text-align: center;
overflow-wrap: break-word;
text-decoration-color: unset !important;
text-decoration: none !important;
background-color: #ecf9ff;
border-bottom: 1px solid #000;
}