mirror of
https://github.com/marktext/marktext.git
synced 2025-05-03 02:10:29 +08:00
Fix unnecessary character sanitation on clipboard output (#2197)
This commit is contained in:
parent
c79f84e5cb
commit
393139e5c9
@ -55,7 +55,7 @@ const copyCutCtrl = ContentState => {
|
|||||||
const { type, text, functionType } = startBlock
|
const { type, text, functionType } = startBlock
|
||||||
// Fix issue #942
|
// Fix issue #942
|
||||||
if (type === 'span' && functionType === 'codeContent') {
|
if (type === 'span' && functionType === 'codeContent') {
|
||||||
const selectedText = escapeHtml(text.substring(start.offset, end.offset))
|
const selectedText = text.substring(start.offset, end.offset)
|
||||||
return {
|
return {
|
||||||
html: marked(selectedText, this.muya.options),
|
html: marked(selectedText, this.muya.options),
|
||||||
text: selectedText
|
text: selectedText
|
||||||
@ -212,7 +212,7 @@ const copyCutCtrl = ContentState => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let htmlData = wrapper.innerHTML
|
let htmlData = wrapper.innerHTML
|
||||||
const textData = escapeHtml(this.htmlToMarkdown(htmlData))
|
const textData = this.htmlToMarkdown(htmlData)
|
||||||
htmlData = marked(textData)
|
htmlData = marked(textData)
|
||||||
|
|
||||||
return { html: htmlData, text: textData }
|
return { html: htmlData, text: textData }
|
||||||
|
Loading…
Reference in New Issue
Block a user