This commit is contained in:
Daniel 2024-05-21 16:25:53 +08:00
parent aa817d17ef
commit 50090db09d
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 6 additions and 5 deletions

View file

@ -123,7 +123,7 @@ func extensionCopy(c *gin.Context) {
md, withMath, _ := model.HTML2Markdown(dom)
md = strings.TrimSpace(md)
luteEngine := util.NewStdLute()
luteEngine := util.NewLute()
if withMath {
luteEngine.SetInlineMath(true)
}
@ -153,6 +153,8 @@ func extensionCopy(c *gin.Context) {
unlink.Unlink()
}
parse.NestedInlines2FlattedSpans(tree, false)
md, _ = lute.FormatNodeSync(tree.Root, luteEngine.ParseOptions, luteEngine.RenderOptions)
ret.Data = map[string]interface{}{
"md": md,