Browse Source

:art: Improve heading drag conversion doc subheading level https://github.com/siyuan-note/siyuan/issues/11037

Daniel 1 năm trước cách đây
mục cha
commit
0093dc38e8
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      kernel/model/heading.go

+ 1 - 1
kernel/model/heading.go

@@ -342,7 +342,7 @@ func Heading2Doc(srcHeadingID, targetBoxID, targetPath string) (srcRootBlockID,
 	topLevel := treenode.TopHeadingLevel(newTree)
 	for c := newTree.Root.FirstChild; nil != c; c = c.Next {
 		if ast.NodeHeading == c.Type {
-			c.HeadingLevel = c.HeadingLevel - topLevel + 1
+			c.HeadingLevel = c.HeadingLevel - topLevel + 2
 			if 6 < c.HeadingLevel {
 				c.HeadingLevel = 6
 			}