mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-27 20:08:49 +01:00
🎨 API /api/block/* 支持插入或更新带有块级 IAL 的空段落块 Fix https://github.com/siyuan-note/siyuan/issues/6713
This commit is contained in:
parent
aafbd204db
commit
c0d1451c7b
7 changed files with 10 additions and 29 deletions
|
|
@ -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