mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
🎨 Improve heading drag conversion doc subheading level https://github.com/siyuan-note/siyuan/issues/11037
This commit is contained in:
parent
8963c4d817
commit
0093dc38e8
1 changed files with 1 additions and 1 deletions
|
|
@ -342,7 +342,7 @@ func Heading2Doc(srcHeadingID, targetBoxID, targetPath string) (srcRootBlockID,
|
||||||
topLevel := treenode.TopHeadingLevel(newTree)
|
topLevel := treenode.TopHeadingLevel(newTree)
|
||||||
for c := newTree.Root.FirstChild; nil != c; c = c.Next {
|
for c := newTree.Root.FirstChild; nil != c; c = c.Next {
|
||||||
if ast.NodeHeading == c.Type {
|
if ast.NodeHeading == c.Type {
|
||||||
c.HeadingLevel = c.HeadingLevel - topLevel + 1
|
c.HeadingLevel = c.HeadingLevel - topLevel + 2
|
||||||
if 6 < c.HeadingLevel {
|
if 6 < c.HeadingLevel {
|
||||||
c.HeadingLevel = 6
|
c.HeadingLevel = 6
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue