🎨 Improve the handling of inline-math containing | in the table https://github.com/siyuan-note/siyuan/issues/9227

This commit is contained in:
Daniel 2023-09-25 21:50:02 +08:00
parent 859a541155
commit 734114e052
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
8 changed files with 34 additions and 13 deletions

View file

@ -191,7 +191,7 @@ func ImportSY(zipPath, boxID, toPath string) (err error) {
for _, tree := range trees {
syPath := filepath.Join(unzipRootPath, tree.Path)
if "" == tree.Root.Spec {
parse.NestedInlines2FlattedSpans(tree)
parse.NestedInlines2FlattedSpans(tree, false)
tree.Root.Spec = "1"
}
renderer := render.NewJSONRenderer(tree, luteEngine.RenderOptions)
@ -751,7 +751,7 @@ func parseStdMd(markdown []byte) (ret *parse.Tree) {
}
genTreeID(ret)
imgHtmlBlock2InlineImg(ret)
parse.NestedInlines2FlattedSpansHybrid(ret)
parse.NestedInlines2FlattedSpansHybrid(ret, false)
return
}
@ -1070,7 +1070,7 @@ func buildBlockRefInText() {
}
t := parse.Inline("", n.Tokens, lute.ParseOptions) // 使用行级解析
parse.NestedInlines2FlattedSpans(t)
parse.NestedInlines2FlattedSpans(t, false)
var children []*ast.Node
for c := t.Root.FirstChild.FirstChild; nil != c; c = c.Next {
children = append(children, c)