🐛 Fix inline underscore element paste as plain text https://github.com/siyuan-note/siyuan/issues/13015

This commit is contained in:
Daniel 2024-11-04 09:36:56 +08:00
parent c30a6dd711
commit 9c5a610160
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -182,7 +182,7 @@ export const pasteAsPlainText = async (protyle: IProtyle) => {
textPlain = textPlain.replace(/__@sub@__/g, "<sub>").replace(/__@\/sub@__/g, "</sub>");
textPlain = textPlain.replace(/__@sup@__/g, "<sup>").replace(/__@\/sup@__/g, "</sup>");
textPlain = textPlain.replace(/__@kbd@__/g, "<kbd>").replace(/__@\/kbd@__/g, "</kbd>");
textPlain = textPlain.replace(/__@u@__/g, "<u>").replace(/__@\/u@__/g, "</u");
textPlain = textPlain.replace(/__@u@__/g, "<u>").replace(/__@\/u@__/g, "</u>");
const content = protyle.lute.BlockDOM2EscapeMarkerContent(protyle.lute.Md2BlockDOM(textPlain));
// insertHTML 会进行内部反转义