🎨 Markdown syntax switch no longer affects clip/paste HTML parsing https://github.com/siyuan-note/siyuan/issues/11604

This commit is contained in:
Daniel 2024-10-29 17:44:08 +08:00
parent 505cf51efe
commit 7c6ff6b55f
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
6 changed files with 14 additions and 12 deletions

View file

@ -57,13 +57,14 @@ func html2BlockDOM(c *gin.Context) {
}
dom := arg["dom"].(string)
markdown, withMath, err := model.HTML2Markdown(dom)
luteEngine := util.NewLute()
luteEngine.SetHTMLTag2TextMark(true)
markdown, withMath, err := model.HTML2Markdown(dom, luteEngine)
if err != nil {
ret.Data = "Failed to convert"
return
}
luteEngine := util.NewLute()
if withMath {
luteEngine.SetInlineMath(true)
}