mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 00:38:49 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
1830cb102e
11 changed files with 14 additions and 40 deletions
2
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
2
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
|
|
@ -1,6 +1,6 @@
|
|||
name: 🐛 缺陷报告 Bug Report
|
||||
description: 报告缺陷以帮助我们进行改进 Report defects to help us improve
|
||||
title: "请输入问题报告标题 Please enter the title of the bug report"
|
||||
title: ""
|
||||
body:
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
|
|
|
|||
2
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
2
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
|
|
@ -1,6 +1,6 @@
|
|||
name: ✨ 特性提议 Request new features
|
||||
description: 欢迎提出你所期待的新特性 Come up with the features you expected
|
||||
title: "请输入特性提议标题 Please enter the title of the feature request"
|
||||
title: ""
|
||||
body:
|
||||
- type: textarea
|
||||
attributes:
|
||||
|
|
|
|||
|
|
@ -605,9 +605,8 @@ const initKernel = (initData) => {
|
|||
} finally {
|
||||
count++
|
||||
if (64 < count) {
|
||||
writeLog('get kernel port failed [pid=' + kernelProcessPid + ']')
|
||||
bootWindow.destroy()
|
||||
resolve(false)
|
||||
writeLog('get kernel port failed [pid=' + kernelProcessPid + '], try to use 6806')
|
||||
return kernelPort
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
6
app/stage/protyle/js/lute/lute.min.js
vendored
6
app/stage/protyle/js/lute/lute.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -296,7 +296,7 @@ func broadcastTransactions(transactions []*model.Transaction) {
|
|||
func dataBlockDOM(data string, luteEngine *lute.Lute) (ret string) {
|
||||
luteEngine.SetHTMLTag2TextMark(true) // API `/api/block/**` 无法使用 `<u>foo</u>` 与 `<kbd>bar</kbd>` 插入/更新行内元素 https://github.com/siyuan-note/siyuan/issues/6039
|
||||
|
||||
ret = luteEngine.Md2BlockDOM(data)
|
||||
ret = luteEngine.Md2BlockDOM(data, true)
|
||||
if "" == ret {
|
||||
// 使用 API 插入空字符串出现错误 https://github.com/siyuan-note/siyuan/issues/3931
|
||||
blankParagraph := parse.NewParagraph()
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ require (
|
|||
github.com/88250/clipboard v0.1.5
|
||||
github.com/88250/css v0.1.2
|
||||
github.com/88250/gulu v1.2.3-0.20221117052724-cd06804db798
|
||||
github.com/88250/lute v1.7.5-0.20221124044153-d802c1b13ae6
|
||||
github.com/88250/lute v1.7.5-0.20221125131215-36d8c22c6fdf
|
||||
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
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ 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.20221117052724-cd06804db798 h1:sR/s/Y9wyl79ZRCUERwLPo9zqaB3KhNRodCMTJ4ozEU=
|
||||
github.com/88250/gulu v1.2.3-0.20221117052724-cd06804db798/go.mod h1:I1qBzsksFL2ciGSuqDE7R3XW4BUMrfDgOvSXEk7FsAI=
|
||||
github.com/88250/lute v1.7.5-0.20221124044153-d802c1b13ae6 h1:bhWVdt7x4ejTrMdHOPO6x63YlPLKrBVjr5YcA1icMzw=
|
||||
github.com/88250/lute v1.7.5-0.20221124044153-d802c1b13ae6/go.mod h1:cEoBGi0zArPqAsp0MdG9SKinvH/xxZZWXU7sRx8vHSA=
|
||||
github.com/88250/lute v1.7.5-0.20221125131215-36d8c22c6fdf h1:+mJEMcHwNpS6L7PafD3OvdQ7bFMOUSFHp/6QVOzed0k=
|
||||
github.com/88250/lute v1.7.5-0.20221125131215-36d8c22c6fdf/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=
|
||||
|
|
|
|||
|
|
@ -469,7 +469,7 @@ func genTreeID(tree *parse.Tree) {
|
|||
return ast.WalkContinue
|
||||
}
|
||||
|
||||
if treenode.IsEmptyBlockIAL(n) {
|
||||
if n.IsEmptyBlockIAL() {
|
||||
// 空段落保留
|
||||
p := &ast.Node{Type: ast.NodeParagraph}
|
||||
p.KramdownIAL = parse.Tokens2IAL(n.Tokens)
|
||||
|
|
@ -540,10 +540,6 @@ func FullReindex() {
|
|||
openedBox.Index(true)
|
||||
}
|
||||
IndexRefs()
|
||||
// 缓存根一级的文档树展开
|
||||
for _, openedBox := range openedBoxes {
|
||||
ListDocTree(openedBox.ID, "/", Conf.FileTree.Sort)
|
||||
}
|
||||
treenode.SaveBlockTree()
|
||||
util.PushEndlessProgress(Conf.Language(58))
|
||||
go func() {
|
||||
|
|
|
|||
|
|
@ -602,8 +602,6 @@ func InitBoxes() {
|
|||
if !initialized {
|
||||
box.Index(true)
|
||||
}
|
||||
|
||||
ListDocTree(box.ID, "/", Conf.FileTree.Sort) // 缓存根一级的文档树展开
|
||||
}
|
||||
|
||||
if !initialized {
|
||||
|
|
|
|||
|
|
@ -924,7 +924,7 @@ func CreateDocByMd(boxID, p, title, md string, sorts []string) (err error) {
|
|||
}
|
||||
|
||||
luteEngine := NewLute()
|
||||
dom := luteEngine.Md2BlockDOM(md)
|
||||
dom := luteEngine.Md2BlockDOM(md, false)
|
||||
err = createDoc(box.ID, p, title, dom)
|
||||
if nil != err {
|
||||
return
|
||||
|
|
@ -943,7 +943,7 @@ func CreateWithMarkdown(boxID, hPath, md string) (id string, err error) {
|
|||
|
||||
WaitForWritingFiles()
|
||||
luteEngine := NewLute()
|
||||
dom := luteEngine.Md2BlockDOM(md)
|
||||
dom := luteEngine.Md2BlockDOM(md, false)
|
||||
id, _, err = createDocsByHPath(box.ID, hPath, dom)
|
||||
return
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ import (
|
|||
"github.com/88250/lute"
|
||||
"github.com/88250/lute/ast"
|
||||
"github.com/88250/lute/parse"
|
||||
util2 "github.com/88250/lute/util"
|
||||
"github.com/siyuan-note/siyuan/kernel/util"
|
||||
)
|
||||
|
||||
|
|
@ -86,24 +85,6 @@ func NewTree(boxID, p, hp, title string) *parse.Tree {
|
|||
return ret
|
||||
}
|
||||
|
||||
func IsEmptyBlockIAL(n *ast.Node) bool {
|
||||
if ast.NodeKramdownBlockIAL != n.Type {
|
||||
return false
|
||||
}
|
||||
|
||||
if util2.IsDocIAL(n.Tokens) {
|
||||
return false
|
||||
}
|
||||
|
||||
if nil != n.Previous {
|
||||
if ast.NodeKramdownBlockIAL == n.Previous.Type {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func IALStr(n *ast.Node) string {
|
||||
if 1 > len(n.KramdownIAL) {
|
||||
return ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue