This commit is contained in:
Daniel 2024-11-15 13:13:43 +08:00
parent ab147598e1
commit e408546be5
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 40 additions and 22 deletions

View file

@ -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"