Skip to content

Commit 1ec540a

Browse files
authored
fix: mermaid text color (#1013)
close #280
1 parent 9d673cb commit 1ec540a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

apps/web/src/utils/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,4 +330,11 @@ export async function processClipboardContent(primaryColor: string) {
330330
grand.innerHTML = ``
331331
grand.appendChild(section)
332332
})
333+
334+
// fix: mermaid 部分文本颜色被 stroke 覆盖
335+
clipboardDiv.innerHTML = clipboardDiv.innerHTML
336+
.replace(
337+
/<tspan([^>]*)>/g,
338+
`<tspan$1 style="fill: #333333 !important; color: #333333 !important; stroke: none !important;">`,
339+
)
333340
}

0 commit comments

Comments
 (0)