Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vanessa 2022-09-17 16:59:17 +08:00
commit 012a30b1a5
4 changed files with 11 additions and 4 deletions

File diff suppressed because one or more lines are too long

View file

@ -7,7 +7,7 @@ require (
github.com/88250/css v0.1.2
github.com/88250/flock v0.8.2
github.com/88250/gulu v1.2.3-0.20220916075322-eb117059d70a
github.com/88250/lute v1.7.5-0.20220916135848-a73c0dfd7277
github.com/88250/lute v1.7.5-0.20220917082927-10e93fd8d391
github.com/88250/pdfcpu v0.3.13
github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1
github.com/ConradIrwin/font v0.0.0-20210318200717-ce8d41cc0732

View file

@ -19,8 +19,10 @@ github.com/88250/go-sqlite3 v1.14.13-0.20220714142610-fbbda1ee84f5 h1:8HdZozCsXS
github.com/88250/go-sqlite3 v1.14.13-0.20220714142610-fbbda1ee84f5/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
github.com/88250/gulu v1.2.3-0.20220916075322-eb117059d70a h1:qQdnk8clbgA+MXtf5bXOTOby32iQYjqMOn6oBIMV/Tk=
github.com/88250/gulu v1.2.3-0.20220916075322-eb117059d70a/go.mod h1:I1qBzsksFL2ciGSuqDE7R3XW4BUMrfDgOvSXEk7FsAI=
github.com/88250/lute v1.7.5-0.20220916135848-a73c0dfd7277 h1:entozVkX3n18j7YtTL3EFv1u1PkmAq/4vRTsrWi3Eeg=
github.com/88250/lute v1.7.5-0.20220916135848-a73c0dfd7277/go.mod h1:cEoBGi0zArPqAsp0MdG9SKinvH/xxZZWXU7sRx8vHSA=
github.com/88250/lute v1.7.5-0.20220917082102-4005fd7edf28 h1:sZth2ZYgRi5i7Pr1qM9hfyLOBRwbOudU6BKwbLhiCGo=
github.com/88250/lute v1.7.5-0.20220917082102-4005fd7edf28/go.mod h1:cEoBGi0zArPqAsp0MdG9SKinvH/xxZZWXU7sRx8vHSA=
github.com/88250/lute v1.7.5-0.20220917082927-10e93fd8d391 h1:/khP1uYkLZoYtaicG7rRiiOWIhrxD1cZqBXc536t/uc=
github.com/88250/lute v1.7.5-0.20220917082927-10e93fd8d391/go.mod h1:cEoBGi0zArPqAsp0MdG9SKinvH/xxZZWXU7sRx8vHSA=
github.com/88250/pdfcpu v0.3.13 h1:touMWMZkCGalMIbEg9bxYp7rETM+zwb9hXjwhqi4I7Q=
github.com/88250/pdfcpu v0.3.13/go.mod h1:S5YT38L/GCjVjmB4PB84PymA1qfopjEhfhTNQilLpv4=
github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1 h1:48T899JQDwyyRu9yXHePYlPdHtpJfrJEUGBMH3SMBWY=

View file

@ -452,6 +452,7 @@ func ExportHTML(id, savePath string, pdf bool) (name, dom string) {
luteEngine.SetFootnotes(true)
luteEngine.RenderOptions.ProtyleContenteditable = false
luteEngine.SetProtyleMarkNetImg(false)
renderer := render.NewProtyleExportRenderer(tree, luteEngine.RenderOptions)
dom = gulu.Str.FromBytes(renderer.Render())
return
@ -1139,6 +1140,10 @@ func exportTree(tree *parse.Tree, wysiwyg, expandKaTexMacros bool) (ret *parse.T
n.InsertBefore(&ast.Node{Type: ast.NodeFootnotesRef, Tokens: []byte("^" + refFoot.refNum), FootnotesRefId: refFoot.refNum, FootnotesRefLabel: []byte("^" + refFoot.refNum)})
}
unlinks = append(unlinks, n)
if nil != n.Next && ast.NodeKramdownSpanIAL == n.Next.Type {
// 引用加排版标记(比如颜色)重叠时丢弃后面的排版属性节点
unlinks = append(unlinks, n.Next)
}
return ast.WalkSkipChildren
})
for _, n := range unlinks {