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

This commit is contained in:
Vanessa 2023-08-12 23:51:27 +08:00
commit b753630c20
4 changed files with 13 additions and 10 deletions

View file

@ -33,7 +33,7 @@ require (
github.com/goccy/go-json v0.10.2
github.com/gofrs/flock v0.8.1
github.com/gorilla/websocket v1.5.0
github.com/imroc/req/v3 v3.41.2
github.com/imroc/req/v3 v3.41.3
github.com/jinzhu/copier v0.3.5
github.com/json-iterator/go v1.1.12
github.com/mattn/go-sqlite3 v2.0.3+incompatible
@ -46,11 +46,11 @@ require (
github.com/radovskyb/watcher v1.0.7
github.com/sashabaranov/go-openai v1.14.1
github.com/shirou/gopsutil/v3 v3.23.7
github.com/siyuan-note/dejavu v0.0.0-20230812025129-a42e397dc8c0
github.com/siyuan-note/dejavu v0.0.0-20230812061552-15339e4e4119
github.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75
github.com/siyuan-note/eventbus v0.0.0-20230804030110-cf250f838c80
github.com/siyuan-note/filelock v0.0.0-20230615140405-d05a21d49524
github.com/siyuan-note/httpclient v0.0.0-20230812024742-5021177b0ad6
github.com/siyuan-note/httpclient v0.0.0-20230812061352-e125bafc2f44
github.com/siyuan-note/logging v0.0.0-20230327073243-ebe83aec1493
github.com/siyuan-note/riff v0.0.0-20230728105206-f7c344346d61
github.com/steambap/captcha v1.4.1

View file

@ -343,8 +343,8 @@ github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:
github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4=
github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY=
github.com/imroc/req/v3 v3.41.2 h1:pfQbb6gD8SO3nnB7kwOo8ycZ22MMs1LDlbMO4lW0i8Y=
github.com/imroc/req/v3 v3.41.2/go.mod h1:MMyMZIxCgAET2In3p0w2sc7GcfUk49Ivdz8tTGJIsWQ=
github.com/imroc/req/v3 v3.41.3 h1:vkBd/j4Kc6utkpgqZjdPpTLYhe1UuCr14/j0EhrVx2E=
github.com/imroc/req/v3 v3.41.3/go.mod h1:MMyMZIxCgAET2In3p0w2sc7GcfUk49Ivdz8tTGJIsWQ=
github.com/jaytaylor/html2text v0.0.0-20180606194806-57d518f124b0/go.mod h1:CVKlgaMiht+LXvHG173ujK6JUhZXKb2u/BQtjPDIvyk=
github.com/jaytaylor/html2text v0.0.0-20200412013138-3577fbdbcff7 h1:g0fAGBisHaEQ0TRq1iBvemFRf+8AEWEmBESSiWB3Vsc=
github.com/jaytaylor/html2text v0.0.0-20200412013138-3577fbdbcff7/go.mod h1:CVKlgaMiht+LXvHG173ujK6JUhZXKb2u/BQtjPDIvyk=
@ -495,16 +495,16 @@ github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFR
github.com/shurcooL/gofontwoff v0.0.0-20181114050219-180f79e6909d h1:lvCTyBbr36+tqMccdGMwuEU+hjux/zL6xSmf5S9ITaA=
github.com/shurcooL/gofontwoff v0.0.0-20181114050219-180f79e6909d/go.mod h1:05UtEgK5zq39gLST6uB0cf3NEHjETfB4Fgr3Gx5R9Vw=
github.com/simplereach/timeutils v1.2.0/go.mod h1:VVbQDfN/FHRZa1LSqcwo4kNZ62OOyqLLGQKYB3pB0Q8=
github.com/siyuan-note/dejavu v0.0.0-20230812025129-a42e397dc8c0 h1:As9V8DE+v5LVHQCs0w0AaiEJU+yu7AR072YUr6YQ368=
github.com/siyuan-note/dejavu v0.0.0-20230812025129-a42e397dc8c0/go.mod h1:XCQgtoqU3wlQ5mVdr8Xe/C2D0eVXGUH4kLfv+LJA4j4=
github.com/siyuan-note/dejavu v0.0.0-20230812061552-15339e4e4119 h1:gGhnbCcMF/QC7Kkex1UCJ+BDtvkzeEC7Yfx7xoRW1Gw=
github.com/siyuan-note/dejavu v0.0.0-20230812061552-15339e4e4119/go.mod h1:taK1wlxtXaATV9YfI0LuglnhISOsDvhlJVdrUUpES/w=
github.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75 h1:Bi7/7f29LW+Fm0cHc0J1NO1cZqyJwljSWVmfOqVZgaE=
github.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75/go.mod h1:H8fyqqAbp9XreANjeSbc72zEdFfKTXYN34tc1TjZwtw=
github.com/siyuan-note/eventbus v0.0.0-20230804030110-cf250f838c80 h1:XghjHKJd+SiL0DkGYFVC+UGUDFtnR4v9gkAbPeh9Eq8=
github.com/siyuan-note/eventbus v0.0.0-20230804030110-cf250f838c80/go.mod h1:Sqo4FYX5lAXu7gWkbEdJF0e6P57tNNVV4WDKYDctokI=
github.com/siyuan-note/filelock v0.0.0-20230615140405-d05a21d49524 h1:ZuxN5gwqtUOd1NkOkNhM4OlVWfjujY98zsR+zFi4x9g=
github.com/siyuan-note/filelock v0.0.0-20230615140405-d05a21d49524/go.mod h1:jK5lCYfPbFOrW23/HMeU7kmpLdEd5GkennF+kUpy7Vs=
github.com/siyuan-note/httpclient v0.0.0-20230812024742-5021177b0ad6 h1:5tJ/yXPP6OVZpsNlN/SbsOuBorkhj163JPiZssP3v94=
github.com/siyuan-note/httpclient v0.0.0-20230812024742-5021177b0ad6/go.mod h1:nl9Iky24pHKVNMlPL4PjhIPaKuJkbDn3kc+Yl+9PbNI=
github.com/siyuan-note/httpclient v0.0.0-20230812061352-e125bafc2f44 h1:FrHnhn1Oz4Fzc9AV+U0kZnRjYQAM/4RCDKaOS55QMiQ=
github.com/siyuan-note/httpclient v0.0.0-20230812061352-e125bafc2f44/go.mod h1:nHi+ixu3kBKbh9iJ5MtuWQobv+R1k770PBg2IetPuFU=
github.com/siyuan-note/logging v0.0.0-20230327073243-ebe83aec1493 h1:oaN5b0WDFkjdBgGxmmBnMrtZxaJ76LZLwhQSZnznJMI=
github.com/siyuan-note/logging v0.0.0-20230327073243-ebe83aec1493/go.mod h1:6mRFtAAvYPn3cDzqvyv+t8BVPGqpONDMMb5ywOhY1D4=
github.com/siyuan-note/riff v0.0.0-20230728105206-f7c344346d61 h1:67G1+JSlkcbRsCig83khfK7e96DxrsVnha87Tm/xgdo=

View file

@ -134,7 +134,10 @@ func getNodeRefText(node *ast.Node) string {
ret = util.EscapeHTML(ret)
return ret
}
return getNodeRefText0(node)
}
func getNodeRefText0(node *ast.Node) string {
switch node.Type {
case ast.NodeBlockQueryEmbed:
return "Query Embed Block..."

View file

@ -272,7 +272,7 @@ func Heading2Doc(srcHeadingID, targetBoxID, targetPath string) (srcRootBlockID,
}
box := Conf.Box(targetBoxID)
headingText := getNodeRefText(headingNode)
headingText := getNodeRefText0(headingNode)
headingText = util.FilterFileName(headingText)
moveToRoot := "/" == targetPath