From 4aac04d347498aee9c5cf5a4500050e7c1d41f8b Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Wed, 14 Sep 2022 19:53:22 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E8=A1=8C=E7=BA=A7=E5=85=83=E7=B4=A0?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=B5=8C=E5=A5=97=E5=92=8C=E4=BA=A4=E5=8F=89?= =?UTF-8?q?=20https://github.com/siyuan-note/siyuan/issues/2911?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/go.mod | 2 +- kernel/sql/block_query.go | 2 +- kernel/sql/database.go | 4 ++-- kernel/treenode/node.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel/go.mod b/kernel/go.mod index 1120c423b..e785556a6 100644 --- a/kernel/go.mod +++ b/kernel/go.mod @@ -128,7 +128,7 @@ replace github.com/mattn/go-sqlite3 => github.com/88250/go-sqlite3 v1.14.13-0.20 //replace github.com/siyuan-note/dejavu => D:\88250\dejavu //replace github.com/siyuan-note/httpclient => D:\88250\httpclient //replace github.com/siyuan-note/filelock => D:\88250\filelock -//replace github.com/88250/lute => D:\gogogo\src\github.com\88250\lute +replace github.com/88250/lute => D:\gogogo\src\github.com\88250\lute //replace github.com/88250/enumfonts => D:\88250\enumfonts //replace github.com/88250/pdfcpu => D:\88250\pdfcpu //replace github.com/88250/gulu => D:\88250\gulu diff --git a/kernel/sql/block_query.go b/kernel/sql/block_query.go index 690c0dd9e..4b694137f 100644 --- a/kernel/sql/block_query.go +++ b/kernel/sql/block_query.go @@ -655,7 +655,7 @@ func GetContainerText(container *ast.Node) string { ast.NodeCodeSpanContent, ast.NodeInlineMathContent, ast.NodeCodeBlockCode, ast.NodeMathBlockContent: buf.Write(n.Tokens) case ast.NodeTextMark: - buf.WriteString(n.TextMarkTextContent) + buf.WriteString(n.Content()) case ast.NodeBlockRef: if anchor := n.ChildByType(ast.NodeBlockRefText); nil != anchor { buf.WriteString(anchor.Text()) diff --git a/kernel/sql/database.go b/kernel/sql/database.go index 8f05a5ddf..13419b041 100644 --- a/kernel/sql/database.go +++ b/kernel/sql/database.go @@ -400,7 +400,7 @@ func resolveRefContent0(node *ast.Node, anchors *map[string]string, depth *int, ast.NodeCodeSpanContent, ast.NodeInlineMathContent, ast.NodeCodeBlockCode, ast.NodeMathBlockContent: buf.Write(n.Tokens) case ast.NodeTextMark: - buf.WriteString(n.TextMarkTextContent) + buf.WriteString(n.Content()) case ast.NodeBlockRef: if anchor := n.ChildByType(ast.NodeBlockRefText); nil != anchor { buf.WriteString(anchor.Text()) @@ -550,7 +550,7 @@ func buildSpanFromNode(n *ast.Node, tree *parse.Tree, rootID, boxID, p string) ( case ast.NodeCodeSpan: text = n.ChildByType(ast.NodeCodeSpanContent).TokensStr() case ast.NodeTextMark: - text = n.TextMarkTextContent + text = n.Content() typ = typ + " " + n.TextMarkType } diff --git a/kernel/treenode/node.go b/kernel/treenode/node.go index 3df80961d..a4cb25b74 100644 --- a/kernel/treenode/node.go +++ b/kernel/treenode/node.go @@ -90,7 +90,7 @@ func NodeStaticContent(node *ast.Node) string { ast.NodeCodeSpanContent, ast.NodeInlineMathContent, ast.NodeCodeBlockCode, ast.NodeMathBlockContent, ast.NodeHTMLBlock: buf.Write(n.Tokens) case ast.NodeTextMark: - buf.WriteString(n.TextMarkTextContent) + buf.WriteString(n.Content()) case ast.NodeBackslash: buf.WriteByte(lex.ItemBackslash) case ast.NodeBackslashContent: