From fb1c00250047d772ef39fce8aa06a04c7b2aa067 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Thu, 8 Dec 2022 18:07:35 +0800 Subject: [PATCH 1/2] =?UTF-8?q?:memo:=20API=20=E5=8E=BB=E6=8E=89=20Webhook?= =?UTF-8?q?=20=E8=AE=A1=E5=88=92=20=E6=B2=A1=E6=9C=89=E5=A4=AA=E5=A4=9A?= =?UTF-8?q?=E9=9C=80=E6=B1=82=E6=9A=82=E6=97=B6=E4=B8=8D=E8=80=83=E8=99=91?= =?UTF-8?q?=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- API.md | 6 ------ API_zh_CN.md | 6 ------ 2 files changed, 12 deletions(-) diff --git a/API.md b/API.md index 2fe9cf6fe..0a77389c8 100644 --- a/API.md +++ b/API.md @@ -999,9 +999,3 @@ View API token in Settings - About, request header: `Authorization: T ``` * `data`: Precision in milliseconds - -## Webhook - -TBD - -https://ld246.com/article/1627956688432 \ No newline at end of file diff --git a/API_zh_CN.md b/API_zh_CN.md index 7d907090c..72d72dffe 100644 --- a/API_zh_CN.md +++ b/API_zh_CN.md @@ -993,9 +993,3 @@ ``` * `data`: 精度为毫秒 - -## Webhook - -TBD - -https://ld246.com/article/1627956688432 \ No newline at end of file From b3599ee150acd98386b61bd072264f7b3d04263f Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Thu, 8 Dec 2022 18:22:55 +0800 Subject: [PATCH 2/2] =?UTF-8?q?:recycle:=20=E7=A7=BB=E9=99=A4=E6=97=A7?= =?UTF-8?q?=E7=89=88=E4=B8=AD=E7=9A=84=E8=A1=8C=E7=BA=A7=E5=85=83=E7=B4=A0?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E4=BB=A3=E7=A0=81=20https://github.com/siyua?= =?UTF-8?q?n-note/siyuan/issues/6819?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/export.go | 12 ------------ kernel/model/graph.go | 2 +- kernel/model/render.go | 2 -- kernel/sql/block_query.go | 2 -- kernel/sql/database.go | 8 +++----- kernel/treenode/node.go | 2 -- 6 files changed, 4 insertions(+), 24 deletions(-) diff --git a/kernel/model/export.go b/kernel/model/export.go index fbe6a2c02..3116662c9 100644 --- a/kernel/model/export.go +++ b/kernel/model/export.go @@ -1073,18 +1073,6 @@ func exportTree(tree *parse.Tree, wysiwyg, expandKaTexMacros, keepFold bool) (re } switch n.Type { - case ast.NodeTagOpenMarker: // 配置标签开始标记符 - if !wysiwyg { - n.Type = ast.NodeText - n.Tokens = []byte(Conf.Export.TagOpenMarker) - return ast.WalkContinue - } - case ast.NodeTagCloseMarker: // 配置标记结束标记符 - if !wysiwyg { - n.Type = ast.NodeText - n.Tokens = []byte(Conf.Export.TagCloseMarker) - return ast.WalkContinue - } case ast.NodeSuperBlockOpenMarker, ast.NodeSuperBlockLayoutMarker, ast.NodeSuperBlockCloseMarker: if !wysiwyg { unlinks = append(unlinks, n) diff --git a/kernel/model/graph.go b/kernel/model/graph.go index 34465259b..161b2603e 100644 --- a/kernel/model/graph.go +++ b/kernel/model/graph.go @@ -700,7 +700,7 @@ func query2Stmt(queryStr string) (ret string) { if !entering { return ast.WalkContinue } - if ast.NodeTag == n.Type || (n.IsTextMarkType("tag")) { + if n.IsTextMarkType("tag") { tags = append(tags, n.Text()) } return ast.WalkContinue diff --git a/kernel/model/render.go b/kernel/model/render.go index 897a1af52..1f826e313 100644 --- a/kernel/model/render.go +++ b/kernel/model/render.go @@ -46,8 +46,6 @@ func renderOutline(node *ast.Node, luteEngine *lute.Lute) (ret string) { return ast.WalkContinue } switch n.Type { - case ast.NodeTagOpenMarker, ast.NodeTagCloseMarker: - buf.WriteByte('#') case ast.NodeBlockRef: buf.WriteString(html.EscapeString(treenode.GetDynamicBlockRefText(n))) return ast.WalkSkipChildren diff --git a/kernel/sql/block_query.go b/kernel/sql/block_query.go index a1a4b1214..88d5715dd 100644 --- a/kernel/sql/block_query.go +++ b/kernel/sql/block_query.go @@ -656,8 +656,6 @@ func GetContainerText(container *ast.Node) string { return ast.WalkContinue } switch n.Type { - case ast.NodeTagOpenMarker, ast.NodeTagCloseMarker: - buf.WriteByte('#') case ast.NodeText, ast.NodeLinkText, ast.NodeFileAnnotationRefText, ast.NodeFootnotesRef, ast.NodeCodeSpanContent, ast.NodeInlineMathContent, ast.NodeCodeBlockCode, ast.NodeMathBlockContent: buf.Write(n.Tokens) diff --git a/kernel/sql/database.go b/kernel/sql/database.go index 8464396b2..790f912cf 100644 --- a/kernel/sql/database.go +++ b/kernel/sql/database.go @@ -428,8 +428,6 @@ func resolveRefContent0(node *ast.Node, anchors *map[string]string, depth *int, case ast.NodeDocument: buf.WriteString(n.IALAttr("title")) return ast.WalkStop - case ast.NodeTagOpenMarker, ast.NodeTagCloseMarker: - buf.WriteByte('#') case ast.NodeText, ast.NodeLinkText, ast.NodeLinkTitle, ast.NodeFileAnnotationRefText, ast.NodeFootnotesRef, ast.NodeCodeSpanContent, ast.NodeInlineMathContent, ast.NodeCodeBlockCode, ast.NodeMathBlockContent: buf.Write(n.Tokens) @@ -620,11 +618,11 @@ func buildSpanFromNode(n *ast.Node, tree *parse.Tree, rootID, boxID, p string) ( } assets = append(assets, asset) return - case ast.NodeTag, ast.NodeInlineMath, ast.NodeCodeSpan, ast.NodeEmphasis, ast.NodeStrong, ast.NodeStrikethrough, ast.NodeMark, ast.NodeSup, ast.NodeSub, ast.NodeKbd, ast.NodeUnderline, ast.NodeTextMark: + case ast.NodeInlineMath, ast.NodeCodeSpan, ast.NodeEmphasis, ast.NodeStrong, ast.NodeStrikethrough, ast.NodeMark, ast.NodeSup, ast.NodeSub, ast.NodeKbd, ast.NodeUnderline, ast.NodeTextMark: typ := treenode.TypeAbbr(n.Type.String()) var text string switch n.Type { - case ast.NodeTag, ast.NodeEmphasis, ast.NodeStrong, ast.NodeStrikethrough, ast.NodeMark, ast.NodeSup, ast.NodeSub, ast.NodeKbd, ast.NodeUnderline: + case ast.NodeEmphasis, ast.NodeStrong, ast.NodeStrikethrough, ast.NodeMark, ast.NodeSup, ast.NodeSub, ast.NodeKbd, ast.NodeUnderline: text = n.Text() case ast.NodeInlineMath: text = n.ChildByType(ast.NodeInlineMathContent).TokensStr() @@ -843,7 +841,7 @@ func tagFromNode(node *ast.Node) (ret string) { return ast.WalkContinue } - if ast.NodeTag == n.Type || n.IsTextMarkType("tag") { + if n.IsTextMarkType("tag") { tagBuilder.WriteString("#") tagBuilder.WriteString(n.Text()) tagBuilder.WriteString("# ") diff --git a/kernel/treenode/node.go b/kernel/treenode/node.go index 3c8b69774..52d073a69 100644 --- a/kernel/treenode/node.go +++ b/kernel/treenode/node.go @@ -126,8 +126,6 @@ func NodeStaticContent(node *ast.Node) string { } switch n.Type { - case ast.NodeTagOpenMarker, ast.NodeTagCloseMarker: - buf.WriteByte('#') case ast.NodeBlockRef: buf.WriteString(GetDynamicBlockRefText(n)) lastSpace = false