mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-29 21:08:49 +01:00
✨ Callout block https://github.com/siyuan-note/siyuan/issues/16051
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
362f6ffa05
commit
980f6dd0b8
9 changed files with 26 additions and 12 deletions
|
|
@ -54,7 +54,7 @@ func (tx *Transaction) doMoveOutlineHeading(operation *Operation) (ret *TxErr) {
|
|||
|
||||
headings := []*ast.Node{}
|
||||
ast.Walk(tree.Root, func(n *ast.Node, entering bool) ast.WalkStatus {
|
||||
if entering && ast.NodeHeading == n.Type && !n.ParentIs(ast.NodeBlockquote) {
|
||||
if entering && ast.NodeHeading == n.Type && !n.ParentIs(ast.NodeBlockquote) && !n.ParentIs(ast.NodeCallout) {
|
||||
headings = append(headings, n)
|
||||
}
|
||||
return ast.WalkContinue
|
||||
|
|
@ -305,7 +305,7 @@ func outline(tree *parse.Tree) (ret []*Path) {
|
|||
luteEngine := NewLute()
|
||||
var headings []*Block
|
||||
ast.Walk(tree.Root, func(n *ast.Node, entering bool) ast.WalkStatus {
|
||||
if entering && ast.NodeHeading == n.Type && !n.ParentIs(ast.NodeBlockquote) {
|
||||
if entering && ast.NodeHeading == n.Type && !n.ParentIs(ast.NodeBlockquote) && !n.ParentIs(ast.NodeCallout) {
|
||||
n.Box, n.Path = tree.Box, tree.Path
|
||||
block := &Block{
|
||||
RootID: tree.Root.ID,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue