mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 18:10:12 +01:00
🎨 Improve HTML clipping https://github.com/siyuan-note/siyuan/issues/13125#issuecomment-2475461284
This commit is contained in:
parent
ab147598e1
commit
e408546be5
3 changed files with 40 additions and 22 deletions
|
|
@ -58,7 +58,12 @@ func html2BlockDOM(c *gin.Context) {
|
|||
|
||||
dom := arg["dom"].(string)
|
||||
luteEngine := util.NewLute()
|
||||
luteEngine.SetHTMLTag2TextMark(true)
|
||||
luteEngine.SetSup(true)
|
||||
luteEngine.SetSub(true)
|
||||
luteEngine.SetMark(true)
|
||||
luteEngine.SetGFMStrikethrough(true)
|
||||
luteEngine.SetInlineAsterisk(true)
|
||||
luteEngine.SetInlineUnderscore(true)
|
||||
markdown, withMath, err := model.HTML2Markdown(dom, luteEngine)
|
||||
if err != nil {
|
||||
ret.Data = "Failed to convert"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue