Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vanessa 2022-06-24 10:59:35 +08:00
commit d4eab1775d
17 changed files with 1621 additions and 491 deletions

View File

@ -5,7 +5,7 @@
"id": "20200924101106-19z4kaa",
"title": "What is a Content Block",
"type": "doc",
"updated": "20211223192527"
"updated": "20220623201559"
},
"Children": [
{
@ -31,7 +31,7 @@
"Type": "NodeParagraph",
"Properties": {
"id": "20210118101709-9lqij9d",
"updated": "20210415203201"
"updated": "20220623201341"
},
"Children": [
{
@ -40,18 +40,17 @@
},
{
"Type": "NodeTag",
"Data": "span",
"Children": [
{
"Type": "NodeTagOpenMarker",
"Data": "#"
"Type": "NodeTagOpenMarker"
},
{
"Type": "NodeText",
"Data": "Content block"
"Data": "Content Block"
},
{
"Type": "NodeTagCloseMarker",
"Data": "#"
"Type": "NodeTagCloseMarker"
}
]
},
@ -61,19 +60,17 @@
},
{
"Type": "NodeCodeSpan",
"CodeMarkerLen": 1,
"Data": "code",
"Children": [
{
"Type": "NodeCodeSpanOpenMarker",
"Data": "`"
"Type": "NodeCodeSpanOpenMarker"
},
{
"Type": "NodeCodeSpanContent",
"Data": "202008250000-a1b2c3d"
},
{
"Type": "NodeCodeSpanCloseMarker",
"Data": "`"
"Type": "NodeCodeSpanCloseMarker"
}
]
},
@ -133,7 +130,7 @@
"Type": "NodeParagraph",
"Properties": {
"id": "20210104091535-pnp9cmo",
"updated": "20210415203224"
"updated": "20220623201559"
},
"Children": [
{
@ -142,6 +139,7 @@
},
{
"Type": "NodeBlockRef",
"Data": "span",
"Children": [
{
"Type": "NodeOpenParen"
@ -174,18 +172,17 @@
},
{
"Type": "NodeTag",
"Data": "span",
"Children": [
{
"Type": "NodeTagOpenMarker",
"Data": "#"
"Type": "NodeTagOpenMarker"
},
{
"Type": "NodeText",
"Data": "Content block/Type"
"Data": "Content Block/Type"
},
{
"Type": "NodeTagCloseMarker",
"Data": "#"
"Type": "NodeTagCloseMarker"
}
]
}
@ -213,7 +210,8 @@
"ID": "20210104091535-2ybzqz1",
"Type": "NodeParagraph",
"Properties": {
"id": "20210104091535-2ybzqz1"
"id": "20210104091535-2ybzqz1",
"updated": "20220623201418"
},
"Children": [
{
@ -222,18 +220,17 @@
},
{
"Type": "NodeTag",
"Data": "span",
"Children": [
{
"Type": "NodeTagOpenMarker",
"Data": "#"
"Type": "NodeTagOpenMarker"
},
{
"Type": "NodeText",
"Data": "Note"
},
{
"Type": "NodeTagCloseMarker",
"Data": "#"
"Type": "NodeTagCloseMarker"
}
]
},
@ -243,18 +240,17 @@
},
{
"Type": "NodeTag",
"Data": "span",
"Children": [
{
"Type": "NodeTagOpenMarker",
"Data": "#"
"Type": "NodeTagOpenMarker"
},
{
"Type": "NodeText",
"Data": "Content block/Combine"
"Data": "Content Block/Combine"
},
{
"Type": "NodeTagCloseMarker",
"Data": "#"
"Type": "NodeTagCloseMarker"
}
]
}

View File

@ -5,7 +5,7 @@
"id": "20200924101225-k254i8g",
"title": "Content Block Type",
"type": "doc",
"updated": "20220429115804"
"updated": "20220623201527"
},
"Children": [
{
@ -970,7 +970,8 @@
"ID": "20210104091538-a61xzjz",
"Type": "NodeParagraph",
"Properties": {
"id": "20210104091538-a61xzjz"
"id": "20210104091538-a61xzjz",
"updated": "20220623201527"
},
"Children": [
{
@ -979,18 +980,17 @@
},
{
"Type": "NodeTag",
"Data": "span",
"Children": [
{
"Type": "NodeTagOpenMarker",
"Data": "#"
"Type": "NodeTagOpenMarker"
},
{
"Type": "NodeText",
"Data": "Content block/Type"
"Data": "Content Block/Type"
},
{
"Type": "NodeTagCloseMarker",
"Data": "#"
"Type": "NodeTagCloseMarker"
}
]
}

View File

@ -5,7 +5,7 @@
"id": "20200924101256-f8b1sbi",
"title": "Ref Content Block",
"type": "doc",
"updated": "20211223192536"
"updated": "20220623201408"
},
"Children": [
{
@ -28,154 +28,50 @@
]
},
{
"ID": "20210104091542-6dj8jvc",
"ID": "20220623200920-67ob14v",
"Type": "NodeParagraph",
"Properties": {
"id": "20210104091542-6dj8jvc",
"updated": "20210512153449"
"id": "20220623200920-67ob14v",
"updated": "20220623201408"
},
"Children": [
{
"Type": "NodeText",
"Data": "Entering "
"Data": "After entering "
},
{
"Type": "NodeCodeSpan",
"CodeMarkerLen": 1,
"Data": "code",
"Children": [
{
"Type": "NodeCodeSpanOpenMarker",
"Data": "`"
"Type": "NodeCodeSpanOpenMarker"
},
{
"Type": "NodeCodeSpanContent",
"Data": "(("
},
{
"Type": "NodeCodeSpanCloseMarker",
"Data": "`"
"Type": "NodeCodeSpanCloseMarker"
}
]
},
{
"Type": "NodeText",
"Data": " will trigger the content block quotation search, continue to enter as the search keyword, use the up and down keys to select in the search results and press Enter to complete the content block quotation."
}
]
},
{
"ID": "20210104091542-ev4hpxo",
"Type": "NodeParagraph",
"Properties": {
"id": "20210104091542-ev4hpxo"
},
"Children": [
{
"Type": "NodeText",
"Data": "The complete syntax of the content block quote is: "
},
{
"Type": "NodeCodeSpan",
"CodeMarkerLen": 1,
"Children": [
{
"Type": "NodeCodeSpanOpenMarker",
"Data": "`"
},
{
"Type": "NodeCodeSpanContent",
"Data": "((id \"text\"))"
},
{
"Type": "NodeCodeSpanCloseMarker",
"Data": "`"
}
]
},
{
"Type": "NodeText",
"Data": ", where the "
},
{
"Type": "NodeCodeSpan",
"CodeMarkerLen": 1,
"Children": [
{
"Type": "NodeCodeSpanOpenMarker",
"Data": "`"
},
{
"Type": "NodeCodeSpanContent",
"Data": "id"
},
{
"Type": "NodeCodeSpanCloseMarker",
"Data": "`"
}
]
},
{
"Type": "NodeText",
"Data": " is like: "
},
{
"Type": "NodeCodeSpan",
"CodeMarkerLen": 1,
"Children": [
{
"Type": "NodeCodeSpanOpenMarker",
"Data": "`"
},
{
"Type": "NodeCodeSpanContent",
"Data": "202008250000-a1b2c3d"
},
{
"Type": "NodeCodeSpanCloseMarker",
"Data": "`"
}
]
},
{
"Type": "NodeText",
"Data": ", consisting of time and 7 random characters, the content block id is when the content block is created It will be automatically generated; the following "
},
{
"Type": "NodeCodeSpan",
"CodeMarkerLen": 1,
"Children": [
{
"Type": "NodeCodeSpanOpenMarker",
"Data": "`"
},
{
"Type": "NodeCodeSpanContent",
"Data": "text"
},
{
"Type": "NodeCodeSpanCloseMarker",
"Data": "`"
}
]
},
{
"Type": "NodeText",
"Data": " is the custom anchor text for the content block in the quote. After the content block quote is established, hover the mouse over the anchor text and a preview floating layer will pop up to show the quoted content block. "
"Data": ", the content block reference search will be triggered. Continue to input as the search keyword. In the search results, use the up and down keys to select and press Enter to complete the content block reference. After the content block reference is established, hover the mouse. After the anchor text is placed, the preview layer will pop up, showing the referenced content block (definition block). "
},
{
"Type": "NodeTag",
"Data": "span",
"Children": [
{
"Type": "NodeTagOpenMarker",
"Data": "#"
"Type": "NodeTagOpenMarker"
},
{
"Type": "NodeText",
"Data": "Content block/Reference"
"Data": "Content Block/Reference"
},
{
"Type": "NodeTagCloseMarker",
"Data": "#"
"Type": "NodeTagCloseMarker"
}
]
}
@ -421,6 +317,501 @@
]
}
]
},
{
"ID": "20220623201008-is3nn7u",
"Type": "NodeHeading",
"HeadingLevel": 2,
"Properties": {
"id": "20220623201008-is3nn7u",
"updated": "20220623201019"
},
"Children": [
{
"Type": "NodeText",
"Data": "Anchor text"
}
]
},
{
"ID": "20220623201008-piboygr",
"Type": "NodeParagraph",
"Properties": {
"id": "20220623201008-piboygr",
"updated": "20220623201008"
},
"Children": [
{
"Type": "NodeText",
"Data": "Anchor text is the text you see when rendering a reference. It is divided into static anchor text and dynamic anchor text:"
}
]
},
{
"ID": "20220623201008-h2pdjtl",
"Type": "NodeList",
"ListData": {},
"Properties": {
"id": "20220623201008-h2pdjtl",
"updated": "20220623201147"
},
"Children": [
{
"ID": "20220623201008-ay77217",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
"id": "20220623201008-ay77217",
"updated": "20220623201008"
},
"Children": [
{
"ID": "20220623201008-1oosx3r",
"Type": "NodeParagraph",
"Properties": {
"id": "20220623201008-1oosx3r",
"updated": "20220623201008"
},
"Children": [
{
"Type": "NodeText",
"Data": "Static anchor text: It will not change with the content of the definition block, that is, the specified content will be displayed fixedly"
}
]
}
]
},
{
"ID": "20220623201008-zy2xzyl",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
"id": "20220623201008-zy2xzyl",
"updated": "20220623201147"
},
"Children": [
{
"ID": "20220623201008-l0p1dr3",
"Type": "NodeParagraph",
"Properties": {
"id": "20220623201008-l0p1dr3",
"updated": "20220623201147"
},
"Children": [
{
"Type": "NodeText",
"Data": "Dynamic anchor text: follow the content of the defined block, the maximum length can be set in "
},
{
"Type": "NodeKbd",
"Data": "kbd",
"Children": [
{
"Type": "NodeKbdOpenMarker"
},
{
"Type": "NodeText",
"Data": "Settings"
},
{
"Type": "NodeKbdCloseMarker"
}
]
},
{
"Type": "NodeText",
"Data": " - "
},
{
"Type": "NodeKbd",
"Data": "kbd",
"Children": [
{
"Type": "NodeKbdOpenMarker"
},
{
"Type": "NodeText",
"Data": "Editor"
},
{
"Type": "NodeKbdCloseMarker"
}
]
},
{
"Type": "NodeText",
"Data": " - "
},
{
"Type": "NodeKbd",
"Data": "kbd",
"Children": [
{
"Type": "NodeKbdOpenMarker"
},
{
"Type": "NodeText",
"Data": "The maximum length of block ref dynamic anchor text"
},
{
"Type": "NodeKbdCloseMarker"
}
]
},
{
"Type": "NodeText",
"Data": " , supports up to "
},
{
"Type": "NodeCodeSpan",
"Data": "code",
"Children": [
{
"Type": "NodeCodeSpanOpenMarker"
},
{
"Type": "NodeCodeSpanContent",
"Data": "5120"
},
{
"Type": "NodeCodeSpanCloseMarker"
}
]
},
{
"Type": "NodeText",
"Data": " characters"
}
]
}
]
}
]
},
{
"ID": "20220623201008-xeb8r8l",
"Type": "NodeParagraph",
"Properties": {
"id": "20220623201008-xeb8r8l",
"updated": "20220623201008"
},
"Children": [
{
"Type": "NodeText",
"Data": "Here's how to modify anchor text:"
}
]
},
{
"ID": "20220623201008-i8gh5d4",
"Type": "NodeList",
"ListData": {},
"Properties": {
"id": "20220623201008-i8gh5d4",
"updated": "20220623201008"
},
"Children": [
{
"ID": "20220623201008-lgp3it0",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
"id": "20220623201008-lgp3it0",
"updated": "20220623201008"
},
"Children": [
{
"ID": "20220623201008-0o5ttfn",
"Type": "NodeParagraph",
"Properties": {
"id": "20220623201008-0o5ttfn",
"updated": "20220623201008"
},
"Children": [
{
"Type": "NodeText",
"Data": "Move the cursor caret into the reference element and modify the content directly, which will set the reference's anchor text to static anchor text"
}
]
}
]
},
{
"ID": "20220623201008-ni0hyaa",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
"id": "20220623201008-ni0hyaa",
"updated": "20220623201008"
},
"Children": [
{
"ID": "20220623201008-6h4smq5",
"Type": "NodeParagraph",
"Properties": {
"id": "20220623201008-6h4smq5",
"updated": "20220623201008"
},
"Children": [
{
"Type": "NodeText",
"Data": "Right-click the reference element and modify the anchor text in the pop-up menu, so that the anchor text obtained is also static anchor text"
}
]
}
]
},
{
"ID": "20220623201008-taaeskp",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
"id": "20220623201008-taaeskp",
"updated": "20220623201008"
},
"Children": [
{
"ID": "20220623201008-gkk2l3p",
"Type": "NodeParagraph",
"Properties": {
"id": "20220623201008-gkk2l3p",
"updated": "20220623201008"
},
"Children": [
{
"Type": "NodeText",
"Data": "Clear the anchor text in the pop-up menu after right-clicking the reference element, this will use dynamic anchor text"
}
]
}
]
}
]
},
{
"ID": "20220623201008-0h3iwvb",
"Type": "NodeHeading",
"HeadingLevel": 2,
"Properties": {
"id": "20220623201008-0h3iwvb",
"updated": "20220623201232"
},
"Children": [
{
"Type": "NodeText",
"Data": "Syntax"
}
]
},
{
"ID": "20220623201008-5f0sylr",
"Type": "NodeParagraph",
"Properties": {
"id": "20220623201008-5f0sylr",
"updated": "20220623201008"
},
"Children": [
{
"Type": "NodeText",
"Data": "In addition to using "
},
{
"Type": "NodeCodeSpan",
"Data": "code",
"Children": [
{
"Type": "NodeCodeSpanOpenMarker"
},
{
"Type": "NodeCodeSpanContent",
"Data": "(("
},
{
"Type": "NodeCodeSpanCloseMarker"
}
]
},
{
"Type": "NodeText",
"Data": " to trigger a reference search, you can also use the syntax "
},
{
"Type": "NodeCodeSpan",
"Data": "code",
"Children": [
{
"Type": "NodeCodeSpanOpenMarker"
},
{
"Type": "NodeCodeSpanContent",
"Data": "((id \"anchor text\"))"
},
{
"Type": "NodeCodeSpanCloseMarker"
}
]
},
{
"Type": "NodeText",
"Data": " directly."
}
]
},
{
"ID": "20220623201008-7waqp1i",
"Type": "NodeList",
"ListData": {},
"Properties": {
"id": "20220623201008-7waqp1i",
"updated": "20220623201008"
},
"Children": [
{
"ID": "20220623201008-u8tx1ot",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
"id": "20220623201008-u8tx1ot",
"updated": "20220623201008"
},
"Children": [
{
"ID": "20220623201008-w28mhoy",
"Type": "NodeParagraph",
"Properties": {
"id": "20220623201008-w28mhoy",
"updated": "20220623201008"
},
"Children": [
{
"Type": "NodeText",
"Data": "Use "
},
{
"Type": "NodeCodeSpan",
"Data": "code",
"Children": [
{
"Type": "NodeCodeSpanOpenMarker"
},
{
"Type": "NodeCodeSpanContent",
"Data": "\""
},
{
"Type": "NodeCodeSpanCloseMarker"
}
]
},
{
"Type": "NodeText",
"Data": " to wrap anchor text as static anchor text"
}
]
}
]
},
{
"ID": "20220623201008-ua4wzzm",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
"id": "20220623201008-ua4wzzm",
"updated": "20220623201008"
},
"Children": [
{
"ID": "20220623201008-sh8z9bb",
"Type": "NodeParagraph",
"Properties": {
"id": "20220623201008-sh8z9bb",
"updated": "20220623201008"
},
"Children": [
{
"Type": "NodeText",
"Data": "Use "
},
{
"Type": "NodeCodeSpan",
"Data": "code",
"Children": [
{
"Type": "NodeCodeSpanOpenMarker"
},
{
"Type": "NodeCodeSpanContent",
"Data": "'"
},
{
"Type": "NodeCodeSpanCloseMarker"
}
]
},
{
"Type": "NodeText",
"Data": " to wrap anchor text as dynamic anchor text, it will be automatically rewritten when the index is rebuilt"
}
]
}
]
}
]
},
{
"ID": "20220623201008-zjpwqy3",
"Type": "NodeParagraph",
"Properties": {
"id": "20220623201008-zjpwqy3",
"updated": "20220623201008"
},
"Children": [
{
"Type": "NodeText",
"Data": "The main scenario of using the syntax directly is to create a reference through an external tool or API. In most cases, we mainly use "
},
{
"Type": "NodeCodeSpan",
"Data": "code",
"Children": [
{
"Type": "NodeCodeSpanOpenMarker"
},
{
"Type": "NodeCodeSpanContent",
"Data": "(("
},
{
"Type": "NodeCodeSpanCloseMarker"
}
]
},
{
"Type": "NodeText",
"Data": " to trigger a reference search to create a reference."
}
]
}
]
}

View File

@ -5,7 +5,7 @@
"id": "20201117112518-dott91x",
"title": "Embed Content block",
"type": "doc",
"updated": "20211223192551"
"updated": "20220623201506"
},
"Children": [
{
@ -32,7 +32,7 @@
"Type": "NodeParagraph",
"Properties": {
"id": "20210111230452-5lclhuo",
"updated": "20210512154710"
"updated": "20220623201506"
},
"Children": [
{
@ -41,19 +41,17 @@
},
{
"Type": "NodeCodeSpan",
"CodeMarkerLen": 1,
"Data": "code",
"Children": [
{
"Type": "NodeCodeSpanOpenMarker",
"Data": "`"
"Type": "NodeCodeSpanOpenMarker"
},
{
"Type": "NodeCodeSpanContent",
"Data": "{{"
},
{
"Type": "NodeCodeSpanCloseMarker",
"Data": "`"
"Type": "NodeCodeSpanCloseMarker"
}
]
},
@ -63,19 +61,17 @@
},
{
"Type": "NodeCodeSpan",
"CodeMarkerLen": 1,
"Data": "code",
"Children": [
{
"Type": "NodeCodeSpanOpenMarker",
"Data": "`"
"Type": "NodeCodeSpanOpenMarker"
},
{
"Type": "NodeCodeSpanContent",
"Data": "}}"
},
{
"Type": "NodeCodeSpanCloseMarker",
"Data": "`"
"Type": "NodeCodeSpanCloseMarker"
}
]
},
@ -85,19 +81,17 @@
},
{
"Type": "NodeCodeSpan",
"CodeMarkerLen": 1,
"Data": "code",
"Children": [
{
"Type": "NodeCodeSpanOpenMarker",
"Data": "`"
"Type": "NodeCodeSpanOpenMarker"
},
{
"Type": "NodeCodeSpanContent",
"Data": "{{ SELECT * FROM blocks WHERE content LIKE'%Keyword%' }}"
},
{
"Type": "NodeCodeSpanCloseMarker",
"Data": "`"
"Type": "NodeCodeSpanCloseMarker"
}
]
},
@ -107,6 +101,7 @@
},
{
"Type": "NodeBlockRef",
"Data": "span",
"Children": [
{
"Type": "NodeOpenParen"
@ -139,18 +134,17 @@
},
{
"Type": "NodeTag",
"Data": "span",
"Children": [
{
"Type": "NodeTagOpenMarker",
"Data": "#"
"Type": "NodeTagOpenMarker"
},
{
"Type": "NodeText",
"Data": "Content block/Embed"
"Data": "Content Block/Embed"
},
{
"Type": "NodeTagCloseMarker",
"Data": "#"
"Type": "NodeTagCloseMarker"
}
]
}
@ -624,7 +618,8 @@
"ID": "20201224120448-e0ohbtq",
"Type": "NodeParagraph",
"Properties": {
"id": "20201224120448-e0ohbtq"
"id": "20201224120448-e0ohbtq",
"updated": "20220623201429"
},
"Children": [
{
@ -633,19 +628,17 @@
},
{
"Type": "NodeCodeSpan",
"CodeMarkerLen": 1,
"Data": "code",
"Children": [
{
"Type": "NodeCodeSpanOpenMarker",
"Data": "`"
"Type": "NodeCodeSpanOpenMarker"
},
{
"Type": "NodeCodeSpanContent",
"Data": "#Content block/Embed#"
"Data": "#Content Block/Embed#"
},
{
"Type": "NodeCodeSpanCloseMarker",
"Data": "`"
"Type": "NodeCodeSpanCloseMarker"
}
]
},
@ -655,19 +648,17 @@
},
{
"Type": "NodeCodeSpan",
"CodeMarkerLen": 1,
"Data": "code",
"Children": [
{
"Type": "NodeCodeSpanOpenMarker",
"Data": "`"
"Type": "NodeCodeSpanOpenMarker"
},
{
"Type": "NodeCodeSpanContent",
"Data": "#Content block/Reference#"
"Data": "#Content Block/Reference#"
},
{
"Type": "NodeCodeSpanCloseMarker",
"Data": "`"
"Type": "NodeCodeSpanCloseMarker"
}
]
},

View File

@ -5,7 +5,7 @@
"id": "20200813013559-sgbzl5k",
"title": "引用内容块",
"type": "doc",
"updated": "20211223192442"
"updated": "20220623200842"
},
"Children": [
{
@ -32,7 +32,7 @@
"Type": "NodeParagraph",
"Properties": {
"id": "20210104090557-575kpbp",
"updated": "20210512153428"
"updated": "20220623200602"
},
"Children": [
{
@ -41,141 +41,37 @@
},
{
"Type": "NodeCodeSpan",
"CodeMarkerLen": 1,
"Data": "code",
"Children": [
{
"Type": "NodeCodeSpanOpenMarker",
"Data": "`"
"Type": "NodeCodeSpanOpenMarker"
},
{
"Type": "NodeCodeSpanContent",
"Data": "(("
},
{
"Type": "NodeCodeSpanCloseMarker",
"Data": "`"
"Type": "NodeCodeSpanCloseMarker"
}
]
},
{
"Type": "NodeText",
"Data": " 后将触发内容块引用搜索,继续输入作为搜索关键字,在搜索结果中使用上下键选定后回车就可以完成内容块的引用了。"
}
]
},
{
"ID": "20210104090557-s8jwrnu",
"Type": "NodeParagraph",
"Properties": {
"id": "20210104090557-s8jwrnu"
},
"Children": [
{
"Type": "NodeText",
"Data": "内容块引用的完整语法是:"
},
{
"Type": "NodeCodeSpan",
"CodeMarkerLen": 1,
"Children": [
{
"Type": "NodeCodeSpanOpenMarker",
"Data": "`"
},
{
"Type": "NodeCodeSpanContent",
"Data": " ((id \"text\"))"
},
{
"Type": "NodeCodeSpanCloseMarker",
"Data": "`"
}
]
},
{
"Type": "NodeText",
"Data": ",其中 "
},
{
"Type": "NodeCodeSpan",
"CodeMarkerLen": 1,
"Children": [
{
"Type": "NodeCodeSpanOpenMarker",
"Data": "`"
},
{
"Type": "NodeCodeSpanContent",
"Data": "id"
},
{
"Type": "NodeCodeSpanCloseMarker",
"Data": "`"
}
]
},
{
"Type": "NodeText",
"Data": " 形如: "
},
{
"Type": "NodeCodeSpan",
"CodeMarkerLen": 1,
"Children": [
{
"Type": "NodeCodeSpanOpenMarker",
"Data": "`"
},
{
"Type": "NodeCodeSpanContent",
"Data": "202008250000-a1b2c3d"
},
{
"Type": "NodeCodeSpanCloseMarker",
"Data": "`"
}
]
},
{
"Type": "NodeText",
"Data": ",由时间和 7 位随机字符组成,内容块 id 是在创建内容块时就会自动生成的;后面的 "
},
{
"Type": "NodeCodeSpan",
"CodeMarkerLen": 1,
"Children": [
{
"Type": "NodeCodeSpanOpenMarker",
"Data": "`"
},
{
"Type": "NodeCodeSpanContent",
"Data": "text"
},
{
"Type": "NodeCodeSpanCloseMarker",
"Data": "`"
}
]
},
{
"Type": "NodeText",
"Data": " 是在引用处对该内容块的自定义锚文本。建立好内容块引用后,鼠标悬浮在锚文本上后将弹出预览浮层,展现被引用的内容块。"
"Data": " 后将触发内容块引用搜索,继续输入作为搜索关键字,在搜索结果中使用上下键选定后回车就可以完成内容块的引用了。建立好内容块引用后,鼠标悬浮在锚文本上后将弹出预览浮层,展现被引用的内容块(定义块)。"
},
{
"Type": "NodeTag",
"Data": "span",
"Children": [
{
"Type": "NodeTagOpenMarker",
"Data": "#"
"Type": "NodeTagOpenMarker"
},
{
"Type": "NodeText",
"Data": "内容块/引用"
},
{
"Type": "NodeTagCloseMarker",
"Data": "#"
"Type": "NodeTagCloseMarker"
}
]
}
@ -292,28 +188,18 @@
{
"ID": "20210104090557-7zvf09v",
"Type": "NodeList",
"ListData": {
"Tight": true,
"BulletChar": 42,
"Padding": 2,
"Marker": "Kg==",
"Num": -1
},
"ListData": {},
"Properties": {
"id": "20210104090557-7zvf09v",
"updated": "20210908144621"
"updated": "20220623195720"
},
"Children": [
{
"ID": "20210104090557-oiry1d1",
"Type": "NodeListItem",
"Data": "*",
"ListData": {
"Tight": true,
"BulletChar": 42,
"Padding": 2,
"Marker": "Kg==",
"Num": -1
"Marker": "Kg=="
},
"Properties": {
"id": "20210104090557-oiry1d1"
@ -328,6 +214,7 @@
"Children": [
{
"Type": "NodeBlockRef",
"Data": "span",
"Children": [
{
"Type": "NodeOpenParen"
@ -356,7 +243,23 @@
},
{
"Type": "NodeText",
"Data": ":浏览内容块之间的正向和反向链接关系"
"Data": ":浏览"
},
{
"Type": "NodeText",
"Data": "内容块"
},
{
"Type": "NodeText",
"Data": "之间的正向和"
},
{
"Type": "NodeText",
"Data": "反向链接"
},
{
"Type": "NodeText",
"Data": "关系"
}
]
}
@ -365,17 +268,13 @@
{
"ID": "20210104090557-2qggmq4",
"Type": "NodeListItem",
"Data": "*",
"ListData": {
"Tight": true,
"BulletChar": 42,
"Padding": 2,
"Marker": "Kg==",
"Num": -1
"Marker": "Kg=="
},
"Properties": {
"id": "20210104090557-2qggmq4",
"updated": "20210908144621"
"updated": "20220623195720"
},
"Children": [
{
@ -383,7 +282,7 @@
"Type": "NodeParagraph",
"Properties": {
"id": "20210302223302-ifcbul4",
"updated": "20210908144621"
"updated": "20220623195720"
},
"Children": [
{
@ -417,13 +316,518 @@
},
{
"Type": "NodeText",
"Data": ":以文本列表的方式展现当前内容块的反向链接"
"Data": ":以文本列表的方式展现当前"
},
{
"Type": "NodeText",
"Data": "内容块"
},
{
"Type": "NodeText",
"Data": "的"
},
{
"Type": "NodeText",
"Data": "反向链接"
}
]
}
]
}
]
},
{
"ID": "20220623194755-30vtsr7",
"Type": "NodeHeading",
"HeadingLevel": 2,
"Properties": {
"id": "20220623194755-30vtsr7",
"updated": "20220623194758"
},
"Children": [
{
"Type": "NodeText",
"Data": "锚文本"
}
]
},
{
"ID": "20220623194759-un63o8s",
"Type": "NodeParagraph",
"Properties": {
"id": "20220623194759-un63o8s",
"updated": "20220623195050"
},
"Children": [
{
"Type": "NodeText",
"Data": "锚文本即渲染引用时看到的文本,分为静态锚文本和动态锚文本:"
}
]
},
{
"ID": "20220623195050-mpcd3br",
"Type": "NodeList",
"ListData": {},
"Properties": {
"id": "20220623195050-mpcd3br",
"updated": "20220623195233"
},
"Children": [
{
"ID": "20220623195051-q6iegdm",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
"id": "20220623195051-q6iegdm",
"updated": "20220623195135"
},
"Children": [
{
"ID": "20220623195051-ijrhvi2",
"Type": "NodeParagraph",
"Properties": {
"id": "20220623195051-ijrhvi2",
"updated": "20220623195417"
},
"Children": [
{
"Type": "NodeText",
"Data": "静态锚文本:不会跟随定义块内容变化,即固定展现指定的内容"
}
]
}
]
},
{
"ID": "20220623195125-kapn1my",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
"id": "20220623195125-kapn1my",
"updated": "20220623195233"
},
"Children": [
{
"ID": "20220623195125-51yt5os",
"Type": "NodeParagraph",
"Properties": {
"id": "20220623195125-51yt5os",
"updated": "20220623195328"
},
"Children": [
{
"Type": "NodeText",
"Data": "动态锚文本:跟随定义块内容变化,最大长度可在 "
},
{
"Type": "NodeKbd",
"Data": "kbd",
"Children": [
{
"Type": "NodeKbdOpenMarker"
},
{
"Type": "NodeText",
"Data": "设置"
},
{
"Type": "NodeKbdCloseMarker"
}
]
},
{
"Type": "NodeText",
"Data": " - "
},
{
"Type": "NodeKbd",
"Data": "kbd",
"Children": [
{
"Type": "NodeKbdOpenMarker"
},
{
"Type": "NodeText",
"Data": "编辑器"
},
{
"Type": "NodeKbdCloseMarker"
}
]
},
{
"Type": "NodeText",
"Data": " - "
},
{
"Type": "NodeKbd",
"Data": "kbd",
"Children": [
{
"Type": "NodeKbdOpenMarker"
},
{
"Type": "NodeText",
"Data": "块引动态锚文本最大长度"
},
{
"Type": "NodeKbdCloseMarker"
}
]
},
{
"Type": "NodeText",
"Data": " 中设置,最长支持 "
},
{
"Type": "NodeCodeSpan",
"Data": "code",
"Children": [
{
"Type": "NodeCodeSpanOpenMarker"
},
{
"Type": "NodeCodeSpanContent",
"Data": "5120"
},
{
"Type": "NodeCodeSpanCloseMarker"
}
]
},
{
"Type": "NodeText",
"Data": " 个字符"
}
]
}
]
}
]
},
{
"ID": "20220623195419-mc5y2rl",
"Type": "NodeParagraph",
"Properties": {
"id": "20220623195419-mc5y2rl",
"updated": "20220623195748"
},
"Children": [
{
"Type": "NodeText",
"Data": "修改锚文本的方式如下:"
}
]
},
{
"ID": "20220623195559-r0greck",
"Type": "NodeList",
"ListData": {},
"Properties": {
"id": "20220623195559-r0greck",
"updated": "20220623195906"
},
"Children": [
{
"ID": "20220623195600-uawu5gj",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
"id": "20220623195600-uawu5gj",
"updated": "20220623195600"
},
"Children": [
{
"ID": "20220623195600-7hw6t6b",
"Type": "NodeParagraph",
"Properties": {
"id": "20220623195600-7hw6t6b",
"updated": "20220623195659"
},
"Children": [
{
"Type": "NodeText",
"Data": "将光标插入符移入引用元素,直接修改内容,这样会将该引用的锚文本设置为静态锚文本"
}
]
}
]
},
{
"ID": "20220623195701-obv1sdb",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
"id": "20220623195701-obv1sdb"
},
"Children": [
{
"ID": "20220623195701-akeq453",
"Type": "NodeParagraph",
"Properties": {
"id": "20220623195701-akeq453",
"updated": "20220623195737"
},
"Children": [
{
"Type": "NodeText",
"Data": "右键单击引用元素后在弹出的菜单中修改锚文本,这样得到的锚文本也是静态锚文本"
}
]
}
]
},
{
"ID": "20220623195738-5zwao6z",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
"id": "20220623195738-5zwao6z",
"updated": "20220623195906"
},
"Children": [
{
"ID": "20220623195738-7bxe56c",
"Type": "NodeParagraph",
"Properties": {
"id": "20220623195738-7bxe56c",
"updated": "20220623195906"
},
"Children": [
{
"Type": "NodeText",
"Data": "右键单击引用元素后在弹出的菜单中清空锚文本,这样将使用动态锚文本"
}
]
}
]
}
]
},
{
"ID": "20220623194610-9i15h8j",
"Type": "NodeHeading",
"HeadingLevel": 2,
"Properties": {
"id": "20220623194610-9i15h8j",
"updated": "20220623194926"
},
"Children": [
{
"Type": "NodeText",
"Data": "语法"
}
]
},
{
"ID": "20220623194617-93ho3r1",
"Type": "NodeParagraph",
"Properties": {
"id": "20220623194617-93ho3r1",
"updated": "20220623200842"
},
"Children": [
{
"Type": "NodeText",
"Data": "除了使用 "
},
{
"Type": "NodeCodeSpan",
"Data": "code",
"Children": [
{
"Type": "NodeCodeSpanOpenMarker"
},
{
"Type": "NodeCodeSpanContent",
"Data": "(("
},
{
"Type": "NodeCodeSpanCloseMarker"
}
]
},
{
"Type": "NodeText",
"Data": " 触发引用搜索外,也可以直接使用语法 "
},
{
"Type": "NodeCodeSpan",
"Data": "code",
"Children": [
{
"Type": "NodeCodeSpanOpenMarker"
},
{
"Type": "NodeCodeSpanContent",
"Data": "((id \"锚文本\"))"
},
{
"Type": "NodeCodeSpanCloseMarker"
}
]
},
{
"Type": "NodeText",
"Data": "。"
}
]
},
{
"ID": "20220623200042-wi0fnoq",
"Type": "NodeList",
"ListData": {},
"Properties": {
"id": "20220623200042-wi0fnoq",
"updated": "20220623200048"
},
"Children": [
{
"ID": "20220623200048-ksp1pha",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
"id": "20220623200048-ksp1pha",
"updated": "20220623200048"
},
"Children": [
{
"ID": "20220623200048-khk1tas",
"Type": "NodeParagraph",
"Properties": {
"id": "20220623200048-khk1tas",
"updated": "20220623200105"
},
"Children": [
{
"Type": "NodeText",
"Data": "使用 "
},
{
"Type": "NodeCodeSpan",
"Data": "code",
"Children": [
{
"Type": "NodeCodeSpanOpenMarker"
},
{
"Type": "NodeCodeSpanContent",
"Data": "\""
},
{
"Type": "NodeCodeSpanCloseMarker"
}
]
},
{
"Type": "NodeText",
"Data": " 包裹锚文为静态锚文本"
}
]
}
]
},
{
"ID": "20220623200105-p2p4qu7",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
"id": "20220623200105-p2p4qu7"
},
"Children": [
{
"ID": "20220623200105-fpr7anp",
"Type": "NodeParagraph",
"Properties": {
"id": "20220623200105-fpr7anp",
"updated": "20220623200138"
},
"Children": [
{
"Type": "NodeText",
"Data": "使用 "
},
{
"Type": "NodeCodeSpan",
"Data": "code",
"Children": [
{
"Type": "NodeCodeSpanOpenMarker"
},
{
"Type": "NodeCodeSpanContent",
"Data": "'"
},
{
"Type": "NodeCodeSpanCloseMarker"
}
]
},
{
"Type": "NodeText",
"Data": " 包裹锚文本为动态锚文本,会在重建索引是自动重写"
}
]
}
]
}
]
},
{
"ID": "20220623200140-527rg7n",
"Type": "NodeParagraph",
"Properties": {
"id": "20220623200140-527rg7n",
"updated": "20220623200426"
},
"Children": [
{
"Type": "NodeText",
"Data": "直接使用语法的主要场景是通过外部工具或者 API 建立引用,大部分情况下我们主要还是直接使用 "
},
{
"Type": "NodeCodeSpan",
"Data": "code",
"Children": [
{
"Type": "NodeCodeSpanOpenMarker"
},
{
"Type": "NodeCodeSpanContent",
"Data": "(("
},
{
"Type": "NodeCodeSpanCloseMarker"
}
]
},
{
"Type": "NodeText",
"Data": " 触发引用搜索来建立引用。"
}
]
}
]
}

View File

@ -4,7 +4,7 @@
"Properties": {
"id": "20211226120247-63nd8y5",
"title": "引用内容塊",
"updated": "20211228134803"
"updated": "20220623200859"
},
"Children": [
{
@ -23,11 +23,11 @@
]
},
{
"ID": "20211226120337-iozq7fp",
"ID": "20220623200737-sx458du",
"Type": "NodeParagraph",
"Properties": {
"id": "20211226120337-iozq7fp",
"updated": "20211225232238"
"id": "20220623200737-sx458du",
"updated": "20220623200738"
},
"Children": [
{
@ -52,101 +52,7 @@
},
{
"Type": "NodeText",
"Data": " 後將觸發內容塊引用搜索繼續輸入作為搜索關鍵字在搜索結果中使用上下鍵選定後Enter就可以完成內容塊的引用了。"
}
]
},
{
"ID": "20211226120337-o2cufj5",
"Type": "NodeParagraph",
"Properties": {
"id": "20211226120337-o2cufj5",
"updated": "20211228134803"
},
"Children": [
{
"Type": "NodeText",
"Data": "內容塊引用的完整語法是:"
},
{
"Type": "NodeCodeSpan",
"Data": "code",
"Children": [
{
"Type": "NodeCodeSpanOpenMarker"
},
{
"Type": "NodeCodeSpanContent",
"Data": " ((id \"text\"))"
},
{
"Type": "NodeCodeSpanCloseMarker"
}
]
},
{
"Type": "NodeText",
"Data": ",其中 "
},
{
"Type": "NodeCodeSpan",
"Data": "code",
"Children": [
{
"Type": "NodeCodeSpanOpenMarker"
},
{
"Type": "NodeCodeSpanContent",
"Data": "id"
},
{
"Type": "NodeCodeSpanCloseMarker"
}
]
},
{
"Type": "NodeText",
"Data": " 形如: "
},
{
"Type": "NodeCodeSpan",
"Data": "code",
"Children": [
{
"Type": "NodeCodeSpanOpenMarker"
},
{
"Type": "NodeCodeSpanContent",
"Data": "202008250000-a1b2c3d"
},
{
"Type": "NodeCodeSpanCloseMarker"
}
]
},
{
"Type": "NodeText",
"Data": ",由時間和 7 位隨機字符組成,內容塊 id 是在創建內容塊時就會自動生成的;後面的 "
},
{
"Type": "NodeCodeSpan",
"Data": "code",
"Children": [
{
"Type": "NodeCodeSpanOpenMarker"
},
{
"Type": "NodeCodeSpanContent",
"Data": "text"
},
{
"Type": "NodeCodeSpanCloseMarker"
}
]
},
{
"Type": "NodeText",
"Data": " 是在引用處對該內容塊的自定義錨文本。建立好內容塊引用後,滑鼠懸浮在錨文本上後將彈出預覽浮層,展現被引用的內容塊。"
"Data": " 後將觸發內容塊引用搜索,繼續輸入作為搜索關鍵字,在搜索結果中使用上下鍵選定後回車就可以完成內容塊的引用了。建立好內容塊引用後,鼠標懸浮在錨文本上後將彈出預覽浮層,展現被引用的內容塊(定義塊)。"
},
{
"Type": "NodeTag",
@ -388,12 +294,499 @@
]
},
{
"ID": "20211226125751-tez9k3q",
"ID": "20220623200754-u00gfsg",
"Type": "NodeHeading",
"HeadingLevel": 2,
"Properties": {
"id": "20220623200754-u00gfsg",
"updated": "20220623200754"
},
"Children": [
{
"Type": "NodeText",
"Data": "錨文本"
}
]
},
{
"ID": "20220623200754-gwc1rym",
"Type": "NodeParagraph",
"Properties": {
"id": "20211226125751-tez9k3q",
"updated": "20211226125751"
}
"id": "20220623200754-gwc1rym",
"updated": "20220623200754"
},
"Children": [
{
"Type": "NodeText",
"Data": "錨文本即渲染引用時看到的文本,分為靜態錨文本和動態錨文本:"
}
]
},
{
"ID": "20220623200754-doe075z",
"Type": "NodeList",
"ListData": {},
"Properties": {
"id": "20220623200754-doe075z",
"updated": "20220623200754"
},
"Children": [
{
"ID": "20220623200754-sd1ge5a",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
"id": "20220623200754-sd1ge5a",
"updated": "20220623200754"
},
"Children": [
{
"ID": "20220623200754-c8pnbo0",
"Type": "NodeParagraph",
"Properties": {
"id": "20220623200754-c8pnbo0",
"updated": "20220623200754"
},
"Children": [
{
"Type": "NodeText",
"Data": "靜態錨文本:不會跟隨定義塊內容變化,即固定展現指定的內容"
}
]
}
]
},
{
"ID": "20220623200754-aiiq7z3",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
"id": "20220623200754-aiiq7z3",
"updated": "20220623200754"
},
"Children": [
{
"ID": "20220623200754-4srcm5t",
"Type": "NodeParagraph",
"Properties": {
"id": "20220623200754-4srcm5t",
"updated": "20220623200754"
},
"Children": [
{
"Type": "NodeText",
"Data": "動態錨文本:跟隨定義塊內容變化,最大長度可在 "
},
{
"Type": "NodeKbd",
"Data": "kbd",
"Children": [
{
"Type": "NodeKbdOpenMarker"
},
{
"Type": "NodeText",
"Data": "設置"
},
{
"Type": "NodeKbdCloseMarker"
}
]
},
{
"Type": "NodeText",
"Data": " - "
},
{
"Type": "NodeKbd",
"Data": "kbd",
"Children": [
{
"Type": "NodeKbdOpenMarker"
},
{
"Type": "NodeText",
"Data": "編輯器"
},
{
"Type": "NodeKbdCloseMarker"
}
]
},
{
"Type": "NodeText",
"Data": " - "
},
{
"Type": "NodeKbd",
"Data": "kbd",
"Children": [
{
"Type": "NodeKbdOpenMarker"
},
{
"Type": "NodeText",
"Data": "塊引動態錨文本最大長度"
},
{
"Type": "NodeKbdCloseMarker"
}
]
},
{
"Type": "NodeText",
"Data": " 中設置,最長支持 "
},
{
"Type": "NodeCodeSpan",
"Data": "code",
"Children": [
{
"Type": "NodeCodeSpanOpenMarker"
},
{
"Type": "NodeCodeSpanContent",
"Data": "5120"
},
{
"Type": "NodeCodeSpanCloseMarker"
}
]
},
{
"Type": "NodeText",
"Data": " 個字符"
}
]
}
]
}
]
},
{
"ID": "20220623200754-epcli9r",
"Type": "NodeParagraph",
"Properties": {
"id": "20220623200754-epcli9r",
"updated": "20220623200754"
},
"Children": [
{
"Type": "NodeText",
"Data": "修改錨文本的方式如下:"
}
]
},
{
"ID": "20220623200754-0dmv2ty",
"Type": "NodeList",
"ListData": {},
"Properties": {
"id": "20220623200754-0dmv2ty",
"updated": "20220623200754"
},
"Children": [
{
"ID": "20220623200754-vqf7x49",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
"id": "20220623200754-vqf7x49",
"updated": "20220623200754"
},
"Children": [
{
"ID": "20220623200754-43rmvek",
"Type": "NodeParagraph",
"Properties": {
"id": "20220623200754-43rmvek",
"updated": "20220623200754"
},
"Children": [
{
"Type": "NodeText",
"Data": "將光標插入符移入引用元素,直接修改內容,這樣會將該引用的錨文本設置為靜態錨文本"
}
]
}
]
},
{
"ID": "20220623200754-w895rvz",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
"id": "20220623200754-w895rvz",
"updated": "20220623200754"
},
"Children": [
{
"ID": "20220623200754-3muj6kg",
"Type": "NodeParagraph",
"Properties": {
"id": "20220623200754-3muj6kg",
"updated": "20220623200754"
},
"Children": [
{
"Type": "NodeText",
"Data": "右鍵單擊引用元素後在彈出的菜單中修改錨文本,這樣得到的錨文本也是靜態錨文本"
}
]
}
]
},
{
"ID": "20220623200754-hv4k525",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
"id": "20220623200754-hv4k525",
"updated": "20220623200754"
},
"Children": [
{
"ID": "20220623200754-3prcu11",
"Type": "NodeParagraph",
"Properties": {
"id": "20220623200754-3prcu11",
"updated": "20220623200754"
},
"Children": [
{
"Type": "NodeText",
"Data": "右鍵單擊引用元素後在彈出的菜單中清空錨文本,這樣將使用動態錨文本"
}
]
}
]
}
]
},
{
"ID": "20220623200754-kdtvxt1",
"Type": "NodeHeading",
"HeadingLevel": 2,
"Properties": {
"id": "20220623200754-kdtvxt1",
"updated": "20220623200754"
},
"Children": [
{
"Type": "NodeText",
"Data": "語法"
}
]
},
{
"ID": "20220623200859-8ba6jm6",
"Type": "NodeParagraph",
"Properties": {
"id": "20220623200859-8ba6jm6",
"updated": "20220623200859"
},
"Children": [
{
"Type": "NodeText",
"Data": "除了使用 "
},
{
"Type": "NodeCodeSpan",
"Data": "code",
"Children": [
{
"Type": "NodeCodeSpanOpenMarker"
},
{
"Type": "NodeCodeSpanContent",
"Data": "(("
},
{
"Type": "NodeCodeSpanCloseMarker"
}
]
},
{
"Type": "NodeText",
"Data": " 觸發引用搜索外,也可以直接使用語法 "
},
{
"Type": "NodeCodeSpan",
"Data": "code",
"Children": [
{
"Type": "NodeCodeSpanOpenMarker"
},
{
"Type": "NodeCodeSpanContent",
"Data": "((id \"錨文本\"))"
},
{
"Type": "NodeCodeSpanCloseMarker"
}
]
},
{
"Type": "NodeText",
"Data": "。"
}
]
},
{
"ID": "20220623200859-xhkfk38",
"Type": "NodeList",
"ListData": {},
"Properties": {
"id": "20220623200859-xhkfk38",
"updated": "20220623200859"
},
"Children": [
{
"ID": "20220623200859-grgsuoo",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
"id": "20220623200859-grgsuoo",
"updated": "20220623200859"
},
"Children": [
{
"ID": "20220623200859-pma9zfx",
"Type": "NodeParagraph",
"Properties": {
"id": "20220623200859-pma9zfx",
"updated": "20220623200859"
},
"Children": [
{
"Type": "NodeText",
"Data": "使用 "
},
{
"Type": "NodeCodeSpan",
"Data": "code",
"Children": [
{
"Type": "NodeCodeSpanOpenMarker"
},
{
"Type": "NodeCodeSpanContent",
"Data": "\""
},
{
"Type": "NodeCodeSpanCloseMarker"
}
]
},
{
"Type": "NodeText",
"Data": " 包裹錨文為靜態錨文本"
}
]
}
]
},
{
"ID": "20220623200859-p2du2ng",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
"id": "20220623200859-p2du2ng",
"updated": "20220623200859"
},
"Children": [
{
"ID": "20220623200859-xdls0yl",
"Type": "NodeParagraph",
"Properties": {
"id": "20220623200859-xdls0yl",
"updated": "20220623200859"
},
"Children": [
{
"Type": "NodeText",
"Data": "使用 "
},
{
"Type": "NodeCodeSpan",
"Data": "code",
"Children": [
{
"Type": "NodeCodeSpanOpenMarker"
},
{
"Type": "NodeCodeSpanContent",
"Data": "'"
},
{
"Type": "NodeCodeSpanCloseMarker"
}
]
},
{
"Type": "NodeText",
"Data": " 包裹錨文本為動態錨文本,會在重建索引是自動重寫"
}
]
}
]
}
]
},
{
"ID": "20220623200859-x32n6yn",
"Type": "NodeParagraph",
"Properties": {
"id": "20220623200859-x32n6yn",
"updated": "20220623200859"
},
"Children": [
{
"Type": "NodeText",
"Data": "直接使用語法的主要場景是通過外部工具或者 API 建立引用,大部分情況下我們主要還是直接使用 "
},
{
"Type": "NodeCodeSpan",
"Data": "code",
"Children": [
{
"Type": "NodeCodeSpanOpenMarker"
},
{
"Type": "NodeCodeSpanContent",
"Data": "(("
},
{
"Type": "NodeCodeSpanCloseMarker"
}
]
},
{
"Type": "NodeText",
"Data": " 觸發引用搜索來建立引用。"
}
]
}
]
}

View File

@ -84,8 +84,8 @@ func setWorkspaceDir(c *gin.Context) {
}
workspacePaths = append(workspacePaths, path)
workspacePaths = util.RemoveDuplicatedElem(workspacePaths)
workspacePaths = util.RemoveElem(workspacePaths, path)
workspacePaths = gulu.Str.RemoveDuplicatedElem(workspacePaths)
workspacePaths = gulu.Str.RemoveElem(workspacePaths, path)
workspacePaths = append(workspacePaths, path) // 切换的工作空间固定放在最后一个
if data, err = gulu.JSON.MarshalJSON(workspacePaths); nil != err {

View File

@ -6,7 +6,7 @@ require (
github.com/88250/clipboard v0.1.5
github.com/88250/css v0.1.2
github.com/88250/flock v0.8.2
github.com/88250/gulu v1.2.2
github.com/88250/gulu v1.2.3-0.20220623112232-c502d9016360
github.com/88250/lute v1.7.4-0.20220621025353-a289c6a2323b
github.com/88250/melody v0.0.0-20201115062536-c0b3394adcd1
github.com/88250/pdfcpu v0.3.13

View File

@ -48,8 +48,8 @@ github.com/88250/flock v0.8.2/go.mod h1:k+PZxETAUe4vLZx3R39ykvQCIlwHhc7AI2P2NUQV
github.com/88250/go-sqlite3 v1.14.13-0.20220412041952-88c3aaa8595e h1:uXi4QLKI/mswcXuzD+wBjJMkj1C3hK5Tgl3hF6MJpbo=
github.com/88250/go-sqlite3 v1.14.13-0.20220412041952-88c3aaa8595e/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
github.com/88250/gulu v1.2.0/go.mod h1:ZhEJ98UjR2y7j2toGj4/b+1rRELcZFQAPq/Yjyin2yY=
github.com/88250/gulu v1.2.2 h1:LsuDSXI4GjqAD2XasG/DJEHuboKXU2lhZ9w0mnfJj3Y=
github.com/88250/gulu v1.2.2/go.mod h1:I1qBzsksFL2ciGSuqDE7R3XW4BUMrfDgOvSXEk7FsAI=
github.com/88250/gulu v1.2.3-0.20220623112232-c502d9016360 h1:afQ0cjIA/tzwvIDFy9Jf0jFCb1FvWwKuG1QidEMMi4M=
github.com/88250/gulu v1.2.3-0.20220623112232-c502d9016360/go.mod h1:I1qBzsksFL2ciGSuqDE7R3XW4BUMrfDgOvSXEk7FsAI=
github.com/88250/lute v1.7.4-0.20220426011157-34c9bfa2e148/go.mod h1:Bdu9LRNjQhtL3TftbtpjIWTwDVAXoS7AD8QsZQPk7zo=
github.com/88250/lute v1.7.4-0.20220621025353-a289c6a2323b h1:oEfMdET2TVOH/X3R3tWJWf25oPsnh3drPAwPWoFc1so=
github.com/88250/lute v1.7.4-0.20220621025353-a289c6a2323b/go.mod h1:Bdu9LRNjQhtL3TftbtpjIWTwDVAXoS7AD8QsZQPk7zo=

View File

@ -267,7 +267,7 @@ func uploadCloud(sqlAssets []*sql.Asset) (err error) {
return
}
uploadAbsAssets = util.RemoveDuplicatedElem(uploadAbsAssets)
uploadAbsAssets = gulu.Str.RemoveDuplicatedElem(uploadAbsAssets)
util.LogInfof("uploading [%d] assets", len(uploadAbsAssets))
if loadErr := LoadUploadToken(); nil != loadErr {
@ -357,7 +357,7 @@ func saveWorkspaceAssets(assets []string) {
}
confPath := filepath.Join(confDir, "assets.json")
assets = util.RemoveDuplicatedElem(assets)
assets = gulu.Str.RemoveDuplicatedElem(assets)
sort.Strings(assets)
data, err := gulu.JSON.MarshalIndentJSON(assets, "", " ")
if nil != err {

View File

@ -531,11 +531,11 @@ func GetDoc(id string, index int, keyword string, mode int, size int) (blockCoun
tmp = append(tmp, e)
}
excludes = tmp
virtualBlockRefKeywords = util.ExcludeElem(virtualBlockRefKeywords, excludes)
virtualBlockRefKeywords = gulu.Str.ExcludeElem(virtualBlockRefKeywords, excludes)
}
// 虚拟引用排除当前文档名 https://github.com/siyuan-note/siyuan/issues/4537
virtualBlockRefKeywords = util.ExcludeElem(virtualBlockRefKeywords, []string{tree.Root.IALAttr("title")})
virtualBlockRefKeywords = gulu.Str.ExcludeElem(virtualBlockRefKeywords, []string{tree.Root.IALAttr("title")})
if 0 < len(virtualBlockRefKeywords) {
var tmp []string

View File

@ -539,7 +539,7 @@ func getOssUploadToken(filename, cloudDirPath string, length int64) (ret string,
code := result["code"].(float64)
if 0 != code {
msg := result["msg"].(string)
util.LogErrorf("download cloud file failed: %s", msg)
util.LogErrorf("get file [%s] upload token failed: %s", filename, msg)
err = errors.New(fmt.Sprintf(Conf.Language(93), msg))
return
}

View File

@ -132,7 +132,7 @@ func FindReplace(keyword, replacement string, ids []string) (err error) {
return
}
ids = util.RemoveDuplicatedElem(ids)
ids = gulu.Str.RemoveDuplicatedElem(ids)
var renameRoots []*ast.Node
renameRootTitles := map[string]string{}
for _, id := range ids {
@ -403,7 +403,7 @@ func markSearch(text string, keyword string, beforeLen int) (marked string, scor
}
keywords := gulu.Str.SubstringsBetween(marked, "__@mark__", "__mark@__")
keywords = util.RemoveDuplicatedElem(keywords)
keywords = gulu.Str.RemoveDuplicatedElem(keywords)
keyword = strings.Join(keywords, search.TermSep)
marked = strings.ReplaceAll(marked, "__@mark__", "")
marked = strings.ReplaceAll(marked, "__mark@__", "")

View File

@ -21,6 +21,7 @@ import (
"sort"
"strings"
"github.com/88250/gulu"
"github.com/88250/lute/parse"
"github.com/emirpasic/gods/sets/hashset"
"github.com/siyuan-note/siyuan/kernel/util"
@ -44,7 +45,7 @@ func QueryVirtualRefKeywords(name, alias, anchor, doc bool) (ret []string) {
if doc {
ret = append(ret, queryDocTitles()...)
}
ret = util.RemoveDuplicatedElem(ret)
ret = gulu.Str.RemoveDuplicatedElem(ret)
sort.SliceStable(ret, func(i, j int) bool {
return len(ret[i]) >= len(ret[j])
})
@ -187,7 +188,7 @@ func QueryBlockDefIDsByRefText(refText string, excludeIDs []string) (ret []strin
ret = queryDefIDsByDefText(refText, excludeIDs)
ret = append(ret, queryDefIDsByNameAlias(refText, excludeIDs)...)
ret = append(ret, queryDocIDsByTitle(refText, excludeIDs)...)
ret = util.RemoveDuplicatedElem(ret)
ret = gulu.Str.RemoveDuplicatedElem(ret)
return
}

View File

@ -21,6 +21,7 @@ import (
"sort"
"strings"
"github.com/88250/gulu"
"github.com/ConradIrwin/font/sfnt"
"github.com/flopp/go-findfont"
ttc "golang.org/x/image/font/sfnt"
@ -30,7 +31,7 @@ import (
func GetSysFonts(currentLanguage string) (ret []string) {
fonts := loadFonts(currentLanguage)
ret = RemoveDuplicatedElem(fonts)
ret = gulu.Str.RemoveDuplicatedElem(fonts)
ret = removeUnusedFonts(ret)
sort.Strings(ret)
return

View File

@ -23,6 +23,8 @@ import (
"os/exec"
"path"
"strings"
"github.com/88250/gulu"
)
var (
@ -87,7 +89,7 @@ func GetLocalIPs() (ret []string) {
if "android" == Container {
// Android 上用不了 net.InterfaceAddrs() https://github.com/golang/go/issues/40569所以前面使用启动内核传入的参数 localIPs
LocalIPs = append(LocalIPs, "127.0.0.1")
LocalIPs = RemoveDuplicatedElem(LocalIPs)
LocalIPs = gulu.Str.RemoveDuplicatedElem(LocalIPs)
return LocalIPs
}
@ -104,7 +106,7 @@ func GetLocalIPs() (ret []string) {
}
}
ret = append(ret, "127.0.0.1")
ret = RemoveDuplicatedElem(ret)
ret = gulu.Str.RemoveDuplicatedElem(ret)
return
}

View File

@ -1,49 +0,0 @@
// SiYuan - Build Your Eternal Digital Garden
// Copyright (c) 2020-present, b3log.org
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
package util
import "github.com/88250/gulu"
func RemoveElem(slice []string, elem string) (ret []string) {
for _, e := range slice {
if e != elem {
ret = append(ret, e)
}
}
return
}
func ExcludeElem(slice, excludes []string) (ret []string) {
ret = []string{}
for _, e := range slice {
if !gulu.Str.Contains(e, excludes) {
ret = append(ret, e)
}
}
return
}
func RemoveDuplicatedElem(slice []string) (ret []string) {
allKeys := make(map[string]bool)
for _, item := range slice {
if _, value := allKeys[item]; !value {
allKeys[item] = true
ret = append(ret, item)
}
}
return
}