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
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:
parent
6724e83beb
commit
6a32ff3030
@ -20,12 +20,20 @@ const regex_tag = /(<span data-.+?="[^"]*"><\/span>)/g
|
|||||||
// 仅匹配合法 HTML 标签,避免将 $a<b$ 中的 <b 误判为标签并吞掉后续内容
|
// 仅匹配合法 HTML 标签,避免将 $a<b$ 中的 <b 误判为标签并吞掉后续内容
|
||||||
const regex_html = /(<\/?[a-zA-Z][a-zA-Z0-9]*(?:\s+[^>]*)?\s*>)/g
|
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) {
|
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('&', '&')
|
.replaceAll('&', '&')
|
||||||
.replaceAll('<', '<')
|
.replaceAll('<', '<')
|
||||||
.replaceAll('>', '>')
|
.replaceAll('>', '>')
|
||||||
.replaceAll('"', '"')
|
.replaceAll('"', '"')
|
||||||
|
.replace(/\uE000(\d+)\uE001/g, (_, index) => entities[Number(index)]!)
|
||||||
}
|
}
|
||||||
|
|
||||||
function addLatexText(list: any[], text: string) {
|
function addLatexText(list: any[], text: string) {
|
||||||
|
|||||||
@ -770,10 +770,13 @@ const handleEditSave = async () => {
|
|||||||
|
|
||||||
.qml-bk {
|
.qml-bk {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
line-height: 0.8;
|
min-width: 2em;
|
||||||
|
padding: 0 2px;
|
||||||
|
line-height: inherit;
|
||||||
|
vertical-align: baseline;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
text-decoration-color: unset !important;
|
text-decoration: none !important;
|
||||||
background-color: #ecf9ff;
|
background-color: #ecf9ff;
|
||||||
border-bottom: 1px solid #000;
|
border-bottom: 1px solid #000;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user