Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
0da79574d3
4 changed files with 73 additions and 250 deletions
|
@ -6,7 +6,7 @@
|
|||
"id": "20201210233038-3xr19g5",
|
||||
"title": "Conversion of Document and Heading",
|
||||
"type": "doc",
|
||||
"updated": "20211223192545"
|
||||
"updated": "20240415092701"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
|
@ -266,7 +266,8 @@
|
|||
"Num": -1
|
||||
},
|
||||
"Properties": {
|
||||
"id": "20210104091550-zq0ph0f"
|
||||
"id": "20210104091550-zq0ph0f",
|
||||
"updated": "20240415092701"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
|
@ -310,19 +311,21 @@
|
|||
"Num": -1
|
||||
},
|
||||
"Properties": {
|
||||
"id": "20210104091550-hi3ky7o"
|
||||
"id": "20210104091550-hi3ky7o",
|
||||
"updated": "20240415092701"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"ID": "20210302223904-l78gsey",
|
||||
"Type": "NodeParagraph",
|
||||
"Properties": {
|
||||
"id": "20210302223904-l78gsey"
|
||||
"id": "20210302223904-l78gsey",
|
||||
"updated": "20240415092701"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"Type": "NodeText",
|
||||
"Data": "Logically, the document block is a first-level title, and the relative level will be changed according to the insertion position"
|
||||
"Data": "Logically, the document block is a first-level heading, and the relative level will be changed according to the insertion position"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -441,13 +444,10 @@
|
|||
"Type": "NodeHeading",
|
||||
"HeadingLevel": 2,
|
||||
"Properties": {
|
||||
"id": "20210104091550-fualfrs"
|
||||
"id": "20210104091550-fualfrs",
|
||||
"updated": "20210104091550"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"Type": "NodeHeadingC8hMarker",
|
||||
"Data": "## "
|
||||
},
|
||||
{
|
||||
"Type": "NodeText",
|
||||
"Data": "Convert Heading block to Document block"
|
||||
|
@ -455,144 +455,79 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"ID": "20210104091550-1pe70bg",
|
||||
"ID": "20240415092450-yckmprz",
|
||||
"Type": "NodeParagraph",
|
||||
"Properties": {
|
||||
"id": "20210104091550-1pe70bg"
|
||||
"id": "20240415092450-yckmprz",
|
||||
"updated": "20240415092509"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"Type": "NodeText",
|
||||
"Data": "In the editor tab, select the heading block to be converted, press and hold the heading block icon, and then drag it to the folder to be placed in the doc tree. If you need to place it on the notebook root folder, drag the heading block icon to the top notebook icon row."
|
||||
"Data": "Select the heading block that needs to be converted in the editor tab, press and hold the heading block icon, and then drag it to the document tree for conversion. After the heading block is converted to a document block:"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"ID": "20210104091550-atbf12t",
|
||||
"Type": "NodeParagraph",
|
||||
"Properties": {
|
||||
"id": "20210104091550-atbf12t"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"Type": "NodeText",
|
||||
"Data": "After the heading block is converted to a document block:"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"ID": "20210104091550-nsd8w2j",
|
||||
"ID": "20240415092450-z9g5u00",
|
||||
"Type": "NodeList",
|
||||
"ListData": {
|
||||
"BulletChar": 42,
|
||||
"Padding": 2,
|
||||
"Marker": "Kg==",
|
||||
"Num": -1
|
||||
},
|
||||
"ListData": {},
|
||||
"Properties": {
|
||||
"id": "20210104091550-nsd8w2j"
|
||||
"id": "20240415092450-z9g5u00",
|
||||
"updated": "20240415092640"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"ID": "20210104091550-85231ks",
|
||||
"ID": "20240415092511-wlz23no",
|
||||
"Type": "NodeListItem",
|
||||
"Data": "*",
|
||||
"ListData": {
|
||||
"BulletChar": 42,
|
||||
"Padding": 2,
|
||||
"Marker": "Kg==",
|
||||
"Num": -1
|
||||
"Marker": "Kg=="
|
||||
},
|
||||
"Properties": {
|
||||
"id": "20210104091550-85231ks"
|
||||
"id": "20240415092511-wlz23no",
|
||||
"updated": "20240415092523"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"ID": "20210302223904-brosops",
|
||||
"ID": "20240415092511-ek4fnkd",
|
||||
"Type": "NodeParagraph",
|
||||
"Properties": {
|
||||
"id": "20210302223904-brosops"
|
||||
"id": "20240415092511-ek4fnkd",
|
||||
"updated": "20240415092523"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"Type": "NodeText",
|
||||
"Data": "The heading name will become the document name"
|
||||
"Data": "The heading name will become the document title"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"ID": "20210104091550-s2nrev0",
|
||||
"ID": "20240415092513-f6xngjx",
|
||||
"Type": "NodeListItem",
|
||||
"Data": "*",
|
||||
"ListData": {
|
||||
"Tight": true,
|
||||
"BulletChar": 42,
|
||||
"Padding": 2,
|
||||
"Marker": "Kg==",
|
||||
"Num": -1
|
||||
"Marker": "Kg=="
|
||||
},
|
||||
"Properties": {
|
||||
"id": "20210104091550-s2nrev0"
|
||||
"id": "20240415092513-f6xngjx",
|
||||
"updated": "20240415092640"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"ID": "20210302223904-mleww72",
|
||||
"ID": "20240415092513-gteta4u",
|
||||
"Type": "NodeParagraph",
|
||||
"Properties": {
|
||||
"id": "20210302223904-mleww72"
|
||||
"id": "20240415092513-gteta4u",
|
||||
"updated": "20240415092640"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"Type": "NodeText",
|
||||
"Data": "If there are subtitles under the original heading block, the largest level of these subtitles will be used as the first level of the new document, and the remaining subtitles will be adjusted according to the relative level"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"ID": "20210104091550-c8bmph5",
|
||||
"Type": "NodeList",
|
||||
"ListData": {
|
||||
"Tight": true,
|
||||
"BulletChar": 42,
|
||||
"Padding": 2,
|
||||
"Marker": "Kg==",
|
||||
"Num": -1
|
||||
},
|
||||
"Properties": {
|
||||
"id": "20210104091550-c8bmph5"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"ID": "20210104091550-o45r6uw",
|
||||
"Type": "NodeListItem",
|
||||
"Data": "*",
|
||||
"ListData": {
|
||||
"Tight": true,
|
||||
"BulletChar": 42,
|
||||
"Padding": 2,
|
||||
"Marker": "Kg==",
|
||||
"Num": -1
|
||||
},
|
||||
"Properties": {
|
||||
"id": "20210104091550-o45r6uw"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"ID": "20210302223904-62szx4g",
|
||||
"Type": "NodeParagraph",
|
||||
"Properties": {
|
||||
"id": "20210302223904-62szx4g"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"Type": "NodeText",
|
||||
"Data": "For example, the original heading block contains three, four, and five levels of subtitles, and these subtitles will be converted into one, two, and three levels after being converted into a document block"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
"Data": "If there are subheadings under the original heading block, the largest level among these subheadings will be used as the second-level heading in the new document. The remaining subheadings will be adjusted according to the relative levels. For example, the original heading block contains three, four, and five. level subheadings, these subheadings will be converted into second, third, and fourth level headings after conversion to document blocks."
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"id": "20201210103036-1x3vm8t",
|
||||
"title": "文档块和标题块的转换",
|
||||
"type": "doc",
|
||||
"updated": "20211223192452"
|
||||
"updated": "20240415092415"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
|
@ -458,50 +458,31 @@
|
|||
"ID": "20210104090801-9kyqggg",
|
||||
"Type": "NodeParagraph",
|
||||
"Properties": {
|
||||
"id": "20210104090801-9kyqggg"
|
||||
"id": "20210104090801-9kyqggg",
|
||||
"updated": "20240415092405"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"Type": "NodeText",
|
||||
"Data": "在编辑器页签中选择需要转换的标题块,按住该标题块标识图标,然后将其拖拽到文档树需要放置的文件夹中。如果需要放置到笔记本根文件夹上,就将标题块标识图标拖动到顶层的笔记本图标这一行上。"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"ID": "20210104090801-z3yxgmt",
|
||||
"Type": "NodeParagraph",
|
||||
"Properties": {
|
||||
"id": "20210104090801-z3yxgmt"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"Type": "NodeText",
|
||||
"Data": "标题块转换为文档块后:"
|
||||
"Data": "在编辑器页签中选择需要转换的标题块,按住该标题块标识图标,然后就可以将其拖拽到文档树上转换了,标题块转换为文档块后:"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"ID": "20210104090801-2clqrmr",
|
||||
"Type": "NodeList",
|
||||
"ListData": {
|
||||
"BulletChar": 42,
|
||||
"Padding": 2,
|
||||
"Marker": "Kg==",
|
||||
"Num": -1
|
||||
},
|
||||
"ListData": {},
|
||||
"Properties": {
|
||||
"id": "20210104090801-2clqrmr"
|
||||
"id": "20210104090801-2clqrmr",
|
||||
"updated": "20240415092415"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"ID": "20210104090801-u88ud0z",
|
||||
"Type": "NodeListItem",
|
||||
"Data": "*",
|
||||
"ListData": {
|
||||
"BulletChar": 42,
|
||||
"Padding": 2,
|
||||
"Marker": "Kg==",
|
||||
"Num": -1
|
||||
"Marker": "Kg=="
|
||||
},
|
||||
"Properties": {
|
||||
"id": "20210104090801-u88ud0z"
|
||||
|
@ -525,74 +506,26 @@
|
|||
{
|
||||
"ID": "20210104090801-yg8oign",
|
||||
"Type": "NodeListItem",
|
||||
"Data": "*",
|
||||
"ListData": {
|
||||
"Tight": true,
|
||||
"BulletChar": 42,
|
||||
"Padding": 2,
|
||||
"Marker": "Kg==",
|
||||
"Num": -1
|
||||
"Marker": "Kg=="
|
||||
},
|
||||
"Properties": {
|
||||
"id": "20210104090801-yg8oign"
|
||||
"id": "20210104090801-yg8oign",
|
||||
"updated": "20240415092415"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"ID": "20210302223313-g1q27b1",
|
||||
"Type": "NodeParagraph",
|
||||
"Properties": {
|
||||
"id": "20210302223313-g1q27b1"
|
||||
"id": "20210302223313-g1q27b1",
|
||||
"updated": "20240415092415"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"Type": "NodeText",
|
||||
"Data": "原标题块下如果有子标题,则会按照这些子标题中最大的层级作为新文档中一级标题,其余子标题会根据相对层级进行调整"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"ID": "20210104090801-p8uc6ob",
|
||||
"Type": "NodeList",
|
||||
"ListData": {
|
||||
"Tight": true,
|
||||
"BulletChar": 42,
|
||||
"Padding": 2,
|
||||
"Marker": "Kg==",
|
||||
"Num": -1
|
||||
},
|
||||
"Properties": {
|
||||
"id": "20210104090801-p8uc6ob"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"ID": "20210104090801-q88ezjk",
|
||||
"Type": "NodeListItem",
|
||||
"Data": "*",
|
||||
"ListData": {
|
||||
"Tight": true,
|
||||
"BulletChar": 42,
|
||||
"Padding": 2,
|
||||
"Marker": "Kg==",
|
||||
"Num": -1
|
||||
},
|
||||
"Properties": {
|
||||
"id": "20210104090801-q88ezjk"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"ID": "20210302223313-6qh35f3",
|
||||
"Type": "NodeParagraph",
|
||||
"Properties": {
|
||||
"id": "20210302223313-6qh35f3"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"Type": "NodeText",
|
||||
"Data": "比如原标题块下包含了三、四、五级子标题,则转换为文档块后会将这些子标题转换为一、二、三级标题"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
"Data": "原标题块下如果有子标题,则会按照这些子标题中最大的层级作为新文档中二级标题,其余子标题会根据相对层级进行调整,比如原标题块下包含了三、四、五级子标题,则转换为文档块后会将这些子标题转换为二、三、四级标题"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
"Properties": {
|
||||
"id": "20211226120422-bkzsd2e",
|
||||
"title": "文檔塊和標題塊的轉換",
|
||||
"updated": "20211228131818"
|
||||
"type": "doc",
|
||||
"updated": "20240415092439"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
|
@ -393,125 +394,79 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"ID": "20211226120500-7k0tzto",
|
||||
"ID": "20240415092439-6is1c68",
|
||||
"Type": "NodeParagraph",
|
||||
"Properties": {
|
||||
"id": "20211226120500-7k0tzto",
|
||||
"updated": "20211228131818"
|
||||
"id": "20240415092439-6is1c68",
|
||||
"updated": "20240415092439"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"Type": "NodeText",
|
||||
"Data": "在編輯器分頁中選擇需要轉換的標題塊,按住該標題塊標識圖示,然後將其拖拽到文檔樹需要放置的文件夾中。如果需要放置到筆記本根文件夾上,就將標題塊標識圖示拖動到頂層的筆記本圖示這一行上。"
|
||||
"Data": "在編輯器頁簽中選擇需要轉換的標題塊,按住該標題塊標識圖標,然後就可以將其拖曳到文檔樹上轉換了,標題塊轉換為文檔塊後:"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"ID": "20211226120500-ty32b36",
|
||||
"Type": "NodeParagraph",
|
||||
"Properties": {
|
||||
"id": "20211226120500-ty32b36",
|
||||
"updated": "20211225234143"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"Type": "NodeText",
|
||||
"Data": "標題塊轉換為文檔塊後:"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"ID": "20211226120500-u5prece",
|
||||
"ID": "20240415092439-ffkmd1j",
|
||||
"Type": "NodeList",
|
||||
"ListData": {},
|
||||
"Properties": {
|
||||
"id": "20211226120500-u5prece",
|
||||
"updated": "20211225234143"
|
||||
"id": "20240415092439-ffkmd1j",
|
||||
"updated": "20240415092439"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"ID": "20211226120500-zwcr1cw",
|
||||
"ID": "20240415092439-vuesltm",
|
||||
"Type": "NodeListItem",
|
||||
"ListData": {
|
||||
"BulletChar": 42,
|
||||
"Marker": "Kg=="
|
||||
},
|
||||
"Properties": {
|
||||
"id": "20211226120500-zwcr1cw"
|
||||
"id": "20240415092439-vuesltm",
|
||||
"updated": "20240415092439"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"ID": "20211226120500-xq6bldq",
|
||||
"ID": "20240415092439-j4s1hut",
|
||||
"Type": "NodeParagraph",
|
||||
"Properties": {
|
||||
"id": "20211226120500-xq6bldq"
|
||||
"id": "20240415092439-j4s1hut",
|
||||
"updated": "20240415092439"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"Type": "NodeText",
|
||||
"Data": "標題名將變為文檔名"
|
||||
"Data": "標題名將變為文件名"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"ID": "20211226120500-xuzfjwh",
|
||||
"ID": "20240415092439-smqxbga",
|
||||
"Type": "NodeListItem",
|
||||
"ListData": {
|
||||
"BulletChar": 42,
|
||||
"Marker": "Kg=="
|
||||
},
|
||||
"Properties": {
|
||||
"id": "20211226120500-xuzfjwh"
|
||||
"id": "20240415092439-smqxbga",
|
||||
"updated": "20240415092439"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"ID": "20211226120500-605u9ez",
|
||||
"ID": "20240415092439-t6bu4l9",
|
||||
"Type": "NodeParagraph",
|
||||
"Properties": {
|
||||
"id": "20211226120500-605u9ez"
|
||||
"id": "20240415092439-t6bu4l9",
|
||||
"updated": "20240415092439"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"Type": "NodeText",
|
||||
"Data": "原標題塊下如果有子標題,則會按照這些子標題中最大的層級作為新文檔中一級標題,其余子標題會根據相對層級進行調整"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"ID": "20211226120500-rqbu1p5",
|
||||
"Type": "NodeList",
|
||||
"ListData": {},
|
||||
"Properties": {
|
||||
"id": "20211226120500-rqbu1p5"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"ID": "20211226120500-0brf3va",
|
||||
"Type": "NodeListItem",
|
||||
"ListData": {
|
||||
"BulletChar": 42,
|
||||
"Marker": "Kg=="
|
||||
},
|
||||
"Properties": {
|
||||
"id": "20211226120500-0brf3va"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"ID": "20211226120500-aw5oi3a",
|
||||
"Type": "NodeParagraph",
|
||||
"Properties": {
|
||||
"id": "20211226120500-aw5oi3a"
|
||||
},
|
||||
"Children": [
|
||||
{
|
||||
"Type": "NodeText",
|
||||
"Data": "比如原標題塊下包含了三、四、五級子標題,則轉換為文檔塊後會將這些子標題轉換為一、二、三級標題"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
"Data": "原標題區塊下方如果有子標題,則會依照這些子標題中最大的層級作為新文件中二級標題,其餘子標題會根據相對層級進行調整,例如原標題區塊下方包含了三、四、五 層級子標題,則轉換為文件區塊後會將這些子標題轉換為二、三、四級標題"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -524,7 +479,7 @@
|
|||
"Type": "NodeParagraph",
|
||||
"Properties": {
|
||||
"id": "20211226120500-8o1jmk7",
|
||||
"updated": "20211226120500"
|
||||
"updated": "20211225234143"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue