From 77ead023f87564f741dfc15ed6a7a12809fac190 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Sat, 2 Aug 2025 09:32:55 +0800 Subject: [PATCH 1/3] recycle: Refactor getBlockDOM --- kernel/model/block.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/kernel/model/block.go b/kernel/model/block.go index e134b1a6b..b4e4cf1ab 100644 --- a/kernel/model/block.go +++ b/kernel/model/block.go @@ -723,13 +723,8 @@ func GetBlockDOM(id string) (ret string) { return } - tree, err := LoadTreeByBlockID(id) - if err != nil { - return - } - node := treenode.GetNodeInTree(tree, id) - luteEngine := NewLute() - ret = luteEngine.RenderNodeBlockDOM(node) + doms := GetBlockDOMs([]string{id}) + ret = doms[id] return } From 9a89a0eb4c5821b46293826cc346fab4b2f560ca Mon Sep 17 00:00:00 2001 From: Jeffrey Chen <78434827+TCOTC@users.noreply.github.com> Date: Sat, 2 Aug 2025 09:38:43 +0800 Subject: [PATCH 2/3] :art: Document supports copying as Markdown (#15397) * :sparkles: Document supports copying standard Markdown * :sparkles: Document supports copying as Markdown --- app/appearance/langs/ar_SA.json | 1 + app/appearance/langs/de_DE.json | 1 + app/appearance/langs/en_US.json | 1 + app/appearance/langs/es_ES.json | 1 + app/appearance/langs/fr_FR.json | 1 + app/appearance/langs/he_IL.json | 1 + app/appearance/langs/it_IT.json | 1 + app/appearance/langs/ja_JP.json | 1 + app/appearance/langs/pl_PL.json | 1 + app/appearance/langs/pt_BR.json | 1 + app/appearance/langs/ru_RU.json | 1 + app/appearance/langs/zh_CHT.json | 1 + app/appearance/langs/zh_CN.json | 1 + app/src/menus/commonMenuItem.ts | 32 ++++++++++++++++++++++--- app/src/protyle/header/openTitleMenu.ts | 2 +- 15 files changed, 43 insertions(+), 4 deletions(-) diff --git a/app/appearance/langs/ar_SA.json b/app/appearance/langs/ar_SA.json index 1bbb7afdd..bcd1edfc4 100644 --- a/app/appearance/langs/ar_SA.json +++ b/app/appearance/langs/ar_SA.json @@ -1180,6 +1180,7 @@ "newFileTip": "الرجاء فتح دفتر الملاحظات أولاً", "copyBlockRef": "نسخ كمرجع كتلة", "copyBlockEmbed": "نسخ ككتلة تضمين", + "copyMarkdown": "نسخ كـ Markdown", "linkLevel": "العمق", "mark": "تمييز", "splitLR": "تقسيم لليمين", diff --git a/app/appearance/langs/de_DE.json b/app/appearance/langs/de_DE.json index 47f75f90f..07a3a1c5e 100644 --- a/app/appearance/langs/de_DE.json +++ b/app/appearance/langs/de_DE.json @@ -1180,6 +1180,7 @@ "newFileTip": "Bitte öffnen Sie zuerst ein Notizbuch", "copyBlockRef": "Blockreferenz kopieren", "copyBlockEmbed": "Blockeinbettung kopieren", + "copyMarkdown": "Als Markdown kopieren", "linkLevel": "Tiefe", "mark": "Markieren", "splitLR": "Rechts aufteilen", diff --git a/app/appearance/langs/en_US.json b/app/appearance/langs/en_US.json index 9e821ddd4..61fbd4071 100644 --- a/app/appearance/langs/en_US.json +++ b/app/appearance/langs/en_US.json @@ -1180,6 +1180,7 @@ "newFileTip": "Please open a notebook first", "copyBlockRef": "Copy block ref", "copyBlockEmbed": "Copy block embed", + "copyMarkdown": "Copy as Markdown", "linkLevel": "Depth", "mark": "Mark", "splitLR": "Split Right", diff --git a/app/appearance/langs/es_ES.json b/app/appearance/langs/es_ES.json index 383e9d0c8..9e33a5d54 100644 --- a/app/appearance/langs/es_ES.json +++ b/app/appearance/langs/es_ES.json @@ -1180,6 +1180,7 @@ "newFileTip": "Por favor, abra primero un cuaderno de notas", "copyBlockRef": "Copiar bloque referencia", "copyBlockEmbed": "Copiar bloque incrustado", + "copyMarkdown": "Copiar como Markdown", "linkLevel": "Profundidad", "mark": "Marca", "splitLR": "Dividir a la derecha", diff --git a/app/appearance/langs/fr_FR.json b/app/appearance/langs/fr_FR.json index 982d32481..9f1ee5ff6 100644 --- a/app/appearance/langs/fr_FR.json +++ b/app/appearance/langs/fr_FR.json @@ -1180,6 +1180,7 @@ "newFileTip": "Veuillez d'abord ouvrir un carnet de notes", "copyBlockRef": "Copier bloc réf", "copyBlockEmbed": "Copier le bloc en tant que bloc incorporé", + "copyMarkdown": "Copier comme Markdown", "linkLevel": "Niveaux", "mark": "Mark", "splitLR": "Split Droit", diff --git a/app/appearance/langs/he_IL.json b/app/appearance/langs/he_IL.json index 5b7274fb1..d4ebbe7c9 100644 --- a/app/appearance/langs/he_IL.json +++ b/app/appearance/langs/he_IL.json @@ -1180,6 +1180,7 @@ "newFileTip": "אנא פתח מחברת קודם", "copyBlockRef": "העתק הפניה לבלוק", "copyBlockEmbed": "העתק הטמעה לבלוק", + "copyMarkdown": "העתק כ-Markdown", "linkLevel": "עומק", "mark": "סמן", "splitLR": "חלק ימינה", diff --git a/app/appearance/langs/it_IT.json b/app/appearance/langs/it_IT.json index d811d2bfe..41683f622 100644 --- a/app/appearance/langs/it_IT.json +++ b/app/appearance/langs/it_IT.json @@ -1180,6 +1180,7 @@ "newFileTip": "Si prega di aprire prima un taccuino", "copyBlockRef": "Copia riferimento blocco", "copyBlockEmbed": "Copia incorporamento blocco", + "copyMarkdown": "Copia come Markdown", "linkLevel": "Profondità", "mark": "Segna", "splitLR": "Dividi a destra", diff --git a/app/appearance/langs/ja_JP.json b/app/appearance/langs/ja_JP.json index 830dd3edb..efe37d3d9 100644 --- a/app/appearance/langs/ja_JP.json +++ b/app/appearance/langs/ja_JP.json @@ -1180,6 +1180,7 @@ "newFileTip": "最初にノートブックを開いてください", "copyBlockRef": "ブロック参照としてコピー", "copyBlockEmbed": "埋め込みブロックとしてコピー", + "copyMarkdown": "Markdown としてコピー", "linkLevel": "深さ", "mark": "ハイライト", "splitLR": "右に分割", diff --git a/app/appearance/langs/pl_PL.json b/app/appearance/langs/pl_PL.json index 092d8ff85..0968048d0 100644 --- a/app/appearance/langs/pl_PL.json +++ b/app/appearance/langs/pl_PL.json @@ -1180,6 +1180,7 @@ "newFileTip": "Proszę najpierw otworzyć notes", "copyBlockRef": "Skopiuj odniesienie do bloku", "copyBlockEmbed": "Skopiuj blok osadzony", + "copyMarkdown": "Skopiuj jako Markdown", "linkLevel": "Głębokość", "mark": "Zaznacz", "splitLR": "Podziel w prawo", diff --git a/app/appearance/langs/pt_BR.json b/app/appearance/langs/pt_BR.json index dceafde79..09364cd13 100644 --- a/app/appearance/langs/pt_BR.json +++ b/app/appearance/langs/pt_BR.json @@ -1180,6 +1180,7 @@ "newFileTip": "Por favor, abra um bloco de notas primeiro", "copyBlockRef": "Copiar referência de bloco", "copyBlockEmbed": "Copiar bloco incorporado", + "copyMarkdown": "Copiar como Markdown", "linkLevel": "Profundidade", "mark": "Marca", "splitLR": "Dividir à Direita", diff --git a/app/appearance/langs/ru_RU.json b/app/appearance/langs/ru_RU.json index 674a42eab..07eeb1a20 100644 --- a/app/appearance/langs/ru_RU.json +++ b/app/appearance/langs/ru_RU.json @@ -1180,6 +1180,7 @@ "newFileTip": "Пожалуйста, сначала откройте блокнот", "copyBlockRef": "Скопировать ссылку на блок", "copyBlockEmbed": "Скопировать встроенный блок", + "copyMarkdown": "Скопировать как Markdown", "linkLevel": "Глубина", "mark": "Значить", "splitLR": "Разделить направо", diff --git a/app/appearance/langs/zh_CHT.json b/app/appearance/langs/zh_CHT.json index 3807a8937..b575614db 100644 --- a/app/appearance/langs/zh_CHT.json +++ b/app/appearance/langs/zh_CHT.json @@ -1180,6 +1180,7 @@ "newFileTip": "請先打開一個筆記本", "copyBlockRef": "複製為塊引用", "copyBlockEmbed": "複製為嵌入塊", + "copyMarkdown": "複製為 Markdown", "linkLevel": "層級", "mark": "標記", "splitLR": "向右並排顯示", diff --git a/app/appearance/langs/zh_CN.json b/app/appearance/langs/zh_CN.json index 310492d55..a4a9329df 100644 --- a/app/appearance/langs/zh_CN.json +++ b/app/appearance/langs/zh_CN.json @@ -1180,6 +1180,7 @@ "newFileTip": "请先打开一个笔记本", "copyBlockRef": "复制为块引用", "copyBlockEmbed": "复制为嵌入块", + "copyMarkdown": "复制为 Markdown", "linkLevel": "层级", "mark": "标记", "splitLR": "向右分屏", diff --git a/app/src/menus/commonMenuItem.ts b/app/src/menus/commonMenuItem.ts index 0dbd3e1be..055742015 100644 --- a/app/src/menus/commonMenuItem.ts +++ b/app/src/menus/commonMenuItem.ts @@ -6,7 +6,7 @@ import {getSearch, isMobile, isValidAttrName} from "../util/functions"; import {isLocalPath, movePathTo, moveToPath, pathPosix} from "../util/pathName"; import {MenuItem} from "./Menu"; import {saveExport} from "../protyle/export"; -import {isInAndroid, isInHarmony, openByMobile} from "../protyle/util/compatibility"; +import {isInAndroid, isInHarmony, openByMobile, writeText} from "../protyle/util/compatibility"; import {fetchPost, fetchSyncPost} from "../util/fetch"; import {hideMessage, showMessage} from "../dialog/message"; import {Dialog} from "../dialog"; @@ -380,8 +380,8 @@ export const openAttr = (nodeElement: Element, focusName = "bookmark", protyle?: }); }; -export const copySubMenu = (ids: string[], accelerator = true, focusElement?: Element) => { - return [{ +export const copySubMenu = (ids: string[], accelerator = true, focusElement?: Element, stdMarkdownId?: string) => { + const menuItems = [{ id: "copyBlockRef", iconHTML: "", accelerator: accelerator ? window.siyuan.config.keymap.editor.general.copyBlockRef.custom : undefined, @@ -448,6 +448,32 @@ export const copySubMenu = (ids: string[], accelerator = true, focusElement?: El } } }]; + + if (stdMarkdownId) { + menuItems.push({ + id: "copyMarkdown", + iconHTML: "", + label: window.siyuan.languages.copyMarkdown, + accelerator: undefined, + click: async () => { + const response = await fetchSyncPost("/api/export/exportMdContent", { + id: stdMarkdownId, + refMode: 3, + embedMode: 1, + yfm: false, + fillCSSVar: false, + adjustHeadingLevel: false + }); + const text = response.data.content; + writeText(text); + if (focusElement) { + focusBlock(focusElement); + } + } + }); + } + + return menuItems; }; export const exportMd = (id: string) => { diff --git a/app/src/protyle/header/openTitleMenu.ts b/app/src/protyle/header/openTitleMenu.ts index ad1c9a5d5..beca1629f 100644 --- a/app/src/protyle/header/openTitleMenu.ts +++ b/app/src/protyle/header/openTitleMenu.ts @@ -42,7 +42,7 @@ export const openTitleMenu = (protyle: IProtyle, position: IPosition) => { label: window.siyuan.languages.copy, icon: "iconCopy", type: "submenu", - submenu: copySubMenu([protyle.block.rootID]) + submenu: copySubMenu([protyle.block.rootID], true, undefined, protyle.block.showAll ? protyle.block.id : protyle.block.rootID) }).element); if (!protyle.disabled) { window.siyuan.menus.menu.append(movePathToMenu([protyle.path])); From 2b9a2df23351055184cfa5318be951f5305dd83a Mon Sep 17 00:00:00 2001 From: Jeffrey Chen <78434827+TCOTC@users.noreply.github.com> Date: Sat, 2 Aug 2025 09:43:08 +0800 Subject: [PATCH 3/3] :memo: Improve the user guide Template snippet chapter code display (#15402) https://github.com/siyuan-note/siyuan/pull/15345 --- .../20201204184532-3qm9l8n.sy | 76 +++++++++---------- .../20201204181006-7bkppue.sy | 76 +++++++++---------- .../20211226123004-dplpw0o.sy | 63 +++++++-------- .../20240530101000-6x9ivi7.sy | 60 ++++++++------- 4 files changed, 136 insertions(+), 139 deletions(-) diff --git a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20201204184532-3qm9l8n.sy b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20201204184532-3qm9l8n.sy index 62ef36b7a..40174a95b 100644 --- a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20201204184532-3qm9l8n.sy +++ b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20201204184532-3qm9l8n.sy @@ -6,7 +6,7 @@ "id": "20201204184532-3qm9l8n", "title": "Template snippet", "type": "doc", - "updated": "20250331163727" + "updated": "20250801152837" }, "Children": [ { @@ -57,7 +57,7 @@ "HeadingLevel": 2, "Properties": { "id": "20210104091444-jy56z0p", - "updated": "20250331163727" + "updated": "20250801152821" }, "Children": [ { @@ -215,7 +215,7 @@ "ListData": {}, "Properties": { "id": "20210104091444-mwbvc9m", - "updated": "20250331163727" + "updated": "20250801152821" }, "Children": [ { @@ -421,7 +421,7 @@ }, "Properties": { "id": "20210121193829-wfzsf6m", - "updated": "20250331163727" + "updated": "20250801152749" }, "Children": [ { @@ -454,7 +454,7 @@ "Properties": { "id": "20241213215602-dk7iion", "style": "line-height: 22px;", - "updated": "20250331163727" + "updated": "20250801152749" }, "Children": [ { @@ -462,11 +462,12 @@ "Data": "```" }, { - "Type": "NodeCodeBlockFenceInfoMarker" + "Type": "NodeCodeBlockFenceInfoMarker", + "CodeBlockInfo": "dGVtcGxhdGU=" }, { "Type": "NodeCodeBlockCode", - "Data": ".action{$today := now | date \"20060102150405\"}\n.action{$blocks := queryBlocks \"SELECT * FROM blocks WHERE content LIKE '?' AND updated \u003e '?' LIMIT ?\" \"%foo%\" $today \"3\"}\n" + "Data": ".action{ $today := now | date \"20060102150405\" }\n.action{ $blocks := queryBlocks \"SELECT * FROM blocks WHERE content LIKE '?' AND updated \u003e '?' LIMIT ?\" \"%foo%\" $today \"3\" }\n" }, { "Type": "NodeCodeBlockFenceCloseMarker", @@ -485,7 +486,7 @@ }, "Properties": { "id": "20250331163529-vixv1we", - "updated": "20250331163604" + "updated": "20250801152801" }, "Children": [ { @@ -517,7 +518,7 @@ "IsFencedCodeBlock": true, "Properties": { "id": "20250331163550-2r69a54", - "updated": "20250331163604" + "updated": "20250801152801" }, "Children": [ { @@ -525,11 +526,12 @@ "Data": "```" }, { - "Type": "NodeCodeBlockFenceInfoMarker" + "Type": "NodeCodeBlockFenceInfoMarker", + "CodeBlockInfo": "dGVtcGxhdGU=" }, { "Type": "NodeCodeBlockCode", - "Data": ".action{getBlock \"20250331163529-vixv1we\"}\n" + "Data": ".action{ getBlock \"20250331163529-vixv1we\" }\n" }, { "Type": "NodeCodeBlockFenceCloseMarker", @@ -548,7 +550,7 @@ }, "Properties": { "id": "20210504093232-vukp34t", - "updated": "20241224162810" + "updated": "20250801152807" }, "Children": [ { @@ -581,7 +583,7 @@ "Properties": { "id": "20241213215606-a1mq6zf", "style": "line-height: 22px;", - "updated": "20241224162810" + "updated": "20250801152807" }, "Children": [ { @@ -589,11 +591,12 @@ "Data": "```" }, { - "Type": "NodeCodeBlockFenceInfoMarker" + "Type": "NodeCodeBlockFenceInfoMarker", + "CodeBlockInfo": "dGVtcGxhdGU=" }, { "Type": "NodeCodeBlockCode", - "Data": " .action{querySpans \"SELECT * FROM spans LIMIT ?\" \"3\"}\n" + "Data": ".action{ querySpans \"SELECT * FROM spans LIMIT ?\" \"3\" }\n" }, { "Type": "NodeCodeBlockFenceCloseMarker", @@ -612,7 +615,7 @@ }, "Properties": { "id": "20241213214939-he4wmcd", - "updated": "20241213214939" + "updated": "20250801152813" }, "Children": [ { @@ -645,7 +648,7 @@ "Properties": { "id": "20241213215554-rox3jk7", "style": "line-height: 22px;", - "updated": "20241213215554" + "updated": "20250801152813" }, "Children": [ { @@ -653,11 +656,12 @@ "Data": "```" }, { - "Type": "NodeCodeBlockFenceInfoMarker" + "Type": "NodeCodeBlockFenceInfoMarker", + "CodeBlockInfo": "dGVtcGxhdGU=" }, { "Type": "NodeCodeBlockCode", - "Data": " .action{querySQL \"SELECT * FROM refs LIMIT 3\"}\n" + "Data": ".action{ querySQL \"SELECT * FROM refs LIMIT 3\" }\n" }, { "Type": "NodeCodeBlockFenceCloseMarker", @@ -676,7 +680,7 @@ }, "Properties": { "id": "20241212102027-j293sei", - "updated": "20241213215714" + "updated": "20250801152821" }, "Children": [ { @@ -709,7 +713,7 @@ "Properties": { "id": "20241213215714-u0j3i4k", "style": "line-height: 22px;", - "updated": "20241213215714" + "updated": "20250801152821" }, "Children": [ { @@ -717,11 +721,12 @@ "Data": "```" }, { - "Type": "NodeCodeBlockFenceInfoMarker" + "Type": "NodeCodeBlockFenceInfoMarker", + "CodeBlockInfo": "dGVtcGxhdGU=" }, { "Type": "NodeCodeBlockCode", - "Data": ".action{ (statBlock .id).RuneCount} .action{ (statBlock .id).WordCount}\n" + "Data": ".action{ (statBlock .id).RuneCount }\n.action{ (statBlock .id).WordCount }\n" }, { "Type": "NodeCodeBlockFenceCloseMarker", @@ -1411,7 +1416,8 @@ "Type": "NodeHeading", "HeadingLevel": 2, "Properties": { - "id": "20210104091444-xz57sof" + "id": "20210104091444-xz57sof", + "updated": "20250801152837" }, "Children": [ { @@ -1428,36 +1434,26 @@ "ID": "20210104091444-cclnk66", "Type": "NodeCodeBlock", "IsFencedCodeBlock": true, - "CodeBlockFenceChar": 96, - "CodeBlockFenceLen": 3, - "CodeBlockOpenFence": "YGBg", - "CodeBlockInfo": "cGxhaW50ZXh0", - "CodeBlockCloseFence": "YGBg", "Properties": { - "id": "20210104091444-cclnk66" + "id": "20210104091444-cclnk66", + "updated": "20250801152837" }, "Children": [ { "Type": "NodeCodeBlockFenceOpenMarker", - "Data": "```", - "CodeBlockFenceLen": 3 + "Data": "```" }, { "Type": "NodeCodeBlockFenceInfoMarker", - "CodeBlockInfo": "cGxhaW50ZXh0" + "CodeBlockInfo": "dGVtcGxhdGU=" }, { - "ID": "20220307092214-3y1eex2", "Type": "NodeCodeBlockCode", - "Data": ".action{$before := (div (now.Sub (toDate \"2006-01-02\" \"2020-02-19\")).Hours 24)}\n\n.action{$after := (div ((toDate \"2006-01-02\" \"2048-02-19\").Sub now).Hours 24)}\nToday is `.action{now | date \"2006-01-02\"}`.\n\n* `.action{$before}` days have passed since `2020-02-19`\n* There are `.action{$after}` days left from `2048-02-19`\n", - "Properties": { - "id": "20220307092214-3y1eex2" - } + "Data": ".action{ $before := (div (now.Sub (toDate \"2006-01-02\" \"2020-02-19\")).Hours 24) }\n.action{ $after := (div ((toDate \"2006-01-02\" \"2048-02-19\").Sub now).Hours 24) }\nToday is `.action{ now | date \"2006-01-02\" }`.\n\n* `.action{ $before }` days have passed since `2020-02-19`\n* There are `.action{ $after }` days left from `2048-02-19`\n" }, { "Type": "NodeCodeBlockFenceCloseMarker", - "Data": "```", - "CodeBlockFenceLen": 3 + "Data": "```" } ] }, diff --git a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20201204181006-7bkppue.sy b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20201204181006-7bkppue.sy index 80d697553..e595bbc53 100644 --- a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20201204181006-7bkppue.sy +++ b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20201204181006-7bkppue.sy @@ -6,7 +6,7 @@ "id": "20201204181006-7bkppue", "title": "模板片段", "type": "doc", - "updated": "20250331163228" + "updated": "20250801152724" }, "Children": [ { @@ -69,7 +69,7 @@ "HeadingLevel": 2, "Properties": { "id": "20210104091309-fhb549c", - "updated": "20250331163228" + "updated": "20250801152510" }, "Children": [ { @@ -237,7 +237,7 @@ "ListData": {}, "Properties": { "id": "20210104091309-gjkg3u5", - "updated": "20250331163228" + "updated": "20250801152510" }, "Children": [ { @@ -443,7 +443,7 @@ }, "Properties": { "id": "20210121193601-uwo8s5h", - "updated": "20250331163052" + "updated": "20250801152331" }, "Children": [ { @@ -476,7 +476,7 @@ "Properties": { "id": "20210604111446-p6vadfc", "style": "line-height: 22px;", - "updated": "20250331163052" + "updated": "20250801152331" }, "Children": [ { @@ -484,11 +484,12 @@ "Data": "```" }, { - "Type": "NodeCodeBlockFenceInfoMarker" + "Type": "NodeCodeBlockFenceInfoMarker", + "CodeBlockInfo": "dGVtcGxhdGU=" }, { "Type": "NodeCodeBlockCode", - "Data": ".action{$today := now | date \"20060102150405\"}\n.action{$blocks := queryBlocks \"SELECT * FROM blocks WHERE content LIKE '?' AND updated \u003e '?' LIMIT ?\" \"%foo%\" $today \"3\"}\n" + "Data": ".action{ $today := now | date \"20060102150405\" }\n.action{ $blocks := queryBlocks \"SELECT * FROM blocks WHERE content LIKE '?' AND updated \u003e '?' LIMIT ?\" \"%foo%\" $today \"3\" }\n" }, { "Type": "NodeCodeBlockFenceCloseMarker", @@ -507,7 +508,7 @@ }, "Properties": { "id": "20250331162928-53comqi", - "updated": "20250331163228" + "updated": "20250801152339" }, "Children": [ { @@ -539,7 +540,7 @@ "IsFencedCodeBlock": true, "Properties": { "id": "20250331163038-6j2ttlc", - "updated": "20250331163228" + "updated": "20250801152339" }, "Children": [ { @@ -547,11 +548,12 @@ "Data": "```" }, { - "Type": "NodeCodeBlockFenceInfoMarker" + "Type": "NodeCodeBlockFenceInfoMarker", + "CodeBlockInfo": "dGVtcGxhdGU=" }, { "Type": "NodeCodeBlockCode", - "Data": ".action{getBlock \"20250331162928-53comqi\"}\n" + "Data": ".action{ getBlock \"20250331162928-53comqi\" }\n" }, { "Type": "NodeCodeBlockFenceCloseMarker", @@ -570,7 +572,7 @@ }, "Properties": { "id": "20210504093313-4aoyxd0", - "updated": "20241224162826" + "updated": "20250801152509" }, "Children": [ { @@ -603,7 +605,7 @@ "Properties": { "id": "20241213215337-rhkoc8k", "style": "line-height: 22px;", - "updated": "20241224162826" + "updated": "20250801152509" }, "Children": [ { @@ -611,11 +613,12 @@ "Data": "```" }, { - "Type": "NodeCodeBlockFenceInfoMarker" + "Type": "NodeCodeBlockFenceInfoMarker", + "CodeBlockInfo": "dGVtcGxhdGU=" }, { "Type": "NodeCodeBlockCode", - "Data": " .action{querySpans \"SELECT * FROM spans LIMIT ?\" \"3\"}\n" + "Data": ".action{ querySpans \"SELECT * FROM spans LIMIT ?\" \"3\" }\n" }, { "Type": "NodeCodeBlockFenceCloseMarker", @@ -634,7 +637,7 @@ }, "Properties": { "id": "20241213214733-ro4xcjm", - "updated": "20241213215421" + "updated": "20250801152510" }, "Children": [ { @@ -667,7 +670,7 @@ "Properties": { "id": "20241213215240-f33bsqs", "style": "line-height: 22px;", - "updated": "20241213215421" + "updated": "20250801152510" }, "Children": [ { @@ -675,11 +678,12 @@ "Data": "```" }, { - "Type": "NodeCodeBlockFenceInfoMarker" + "Type": "NodeCodeBlockFenceInfoMarker", + "CodeBlockInfo": "dGVtcGxhdGU=" }, { "Type": "NodeCodeBlockCode", - "Data": " .action{querySQL \"SELECT * FROM refs LIMIT 3\"}\n" + "Data": ".action{ querySQL \"SELECT * FROM refs LIMIT 3\" }\n" }, { "Type": "NodeCodeBlockFenceCloseMarker", @@ -698,7 +702,7 @@ }, "Properties": { "id": "20241212101708-0euo6is", - "updated": "20241213215655" + "updated": "20250801152415" }, "Children": [ { @@ -731,7 +735,7 @@ "Properties": { "id": "20241212101810-6ffociu", "style": "line-height: 22px;", - "updated": "20241213215655" + "updated": "20250801152415" }, "Children": [ { @@ -739,11 +743,12 @@ "Data": "```" }, { - "Type": "NodeCodeBlockFenceInfoMarker" + "Type": "NodeCodeBlockFenceInfoMarker", + "CodeBlockInfo": "dGVtcGxhdGU=" }, { "Type": "NodeCodeBlockCode", - "Data": ".action{ (statBlock .id).RuneCount} .action{ (statBlock .id).WordCount}\n" + "Data": ".action{ (statBlock .id).RuneCount }\n.action{ (statBlock .id).WordCount }\n" }, { "Type": "NodeCodeBlockFenceCloseMarker", @@ -1433,7 +1438,8 @@ "Type": "NodeHeading", "HeadingLevel": 2, "Properties": { - "id": "20210104091309-2p68yju" + "id": "20210104091309-2p68yju", + "updated": "20250801152724" }, "Children": [ { @@ -1450,36 +1456,26 @@ "ID": "20210104091309-9ppkq6j", "Type": "NodeCodeBlock", "IsFencedCodeBlock": true, - "CodeBlockFenceChar": 96, - "CodeBlockFenceLen": 3, - "CodeBlockOpenFence": "YGBg", - "CodeBlockInfo": "cGxhaW50ZXh0", - "CodeBlockCloseFence": "YGBg", "Properties": { - "id": "20210104091309-9ppkq6j" + "id": "20210104091309-9ppkq6j", + "updated": "20250801152724" }, "Children": [ { "Type": "NodeCodeBlockFenceOpenMarker", - "Data": "```", - "CodeBlockFenceLen": 3 + "Data": "```" }, { "Type": "NodeCodeBlockFenceInfoMarker", - "CodeBlockInfo": "cGxhaW50ZXh0" + "CodeBlockInfo": "dGVtcGxhdGU=" }, { - "ID": "20220307091943-k77h7sb", "Type": "NodeCodeBlockCode", - "Data": ".action{$before := (div (now.Sub (toDate \"2006-01-02\" \"2020-02-19\")).Hours 24)}\n\n.action{$after := (div ((toDate \"2006-01-02\" \"2048-02-19\").Sub now).Hours 24)}\n今天是 `.action{now | date \"2006-01-02\"}`。\n\n* 距离 `2020-02-19` 已经过去 `.action{$before}` 天\n* 距离 `2048-02-19` 还剩 `.action{$after}` 天\n", - "Properties": { - "id": "20220307091943-k77h7sb" - } + "Data": ".action{ $before := (div (now.Sub (toDate \"2006-01-02\" \"2020-02-19\")).Hours 24) }\n.action{ $after := (div ((toDate \"2006-01-02\" \"2048-02-19\").Sub now).Hours 24) }\n今天是 `.action{ now | date \"2006-01-02\" }`。\n\n* 距离 `2020-02-19` 已经过去 `.action{ $before }` 天\n* 距离 `2048-02-19` 还剩 `.action{ $after }` 天\n" }, { "Type": "NodeCodeBlockFenceCloseMarker", - "Data": "```", - "CodeBlockFenceLen": 3 + "Data": "```" } ] }, diff --git a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226123004-dplpw0o.sy b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226123004-dplpw0o.sy index d9473e141..4b1acdc43 100644 --- a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226123004-dplpw0o.sy +++ b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226123004-dplpw0o.sy @@ -6,7 +6,7 @@ "id": "20211226123004-dplpw0o", "title": "範本片段", "type": "doc", - "updated": "20250331163725" + "updated": "20250801152721" }, "Children": [ { @@ -53,7 +53,7 @@ "HeadingLevel": 2, "Properties": { "id": "20211226123024-eyagqur", - "updated": "20250331163725" + "updated": "20250801152602" }, "Children": [ { @@ -208,7 +208,7 @@ "ListData": {}, "Properties": { "id": "20211226123024-pjvw31z", - "updated": "20250331163725" + "updated": "20250801152602" }, "Children": [ { @@ -414,7 +414,7 @@ }, "Properties": { "id": "20211226123024-e42d7xq", - "updated": "20250331163725" + "updated": "20250801152535" }, "Children": [ { @@ -447,7 +447,7 @@ "Properties": { "id": "20241213215519-mfgruqs", "style": "line-height: 22px;", - "updated": "20250331163725" + "updated": "20250801152535" }, "Children": [ { @@ -455,11 +455,12 @@ "Data": "```" }, { - "Type": "NodeCodeBlockFenceInfoMarker" + "Type": "NodeCodeBlockFenceInfoMarker", + "CodeBlockInfo": "dGVtcGxhdGU=" }, { "Type": "NodeCodeBlockCode", - "Data": ".action{$today := now | date \"20060102150405\"}\n.action{$blocks := queryBlocks \"SELECT * FROM blocks WHERE content LIKE '?' AND updated \u003e '?' LIMIT ?\" \"%foo%\" $today \"3\"}\n" + "Data": ".action{ $today := now | date \"20060102150405\" }\n.action{ $blocks := queryBlocks \"SELECT * FROM blocks WHERE content LIKE '?' AND updated \u003e '?' LIMIT ?\" \"%foo%\" $today \"3\" }\n" }, { "Type": "NodeCodeBlockFenceCloseMarker", @@ -478,7 +479,7 @@ }, "Properties": { "id": "20250331163425-s5u08ng", - "updated": "20250331163515" + "updated": "20250801152542" }, "Children": [ { @@ -510,7 +511,7 @@ "IsFencedCodeBlock": true, "Properties": { "id": "20250331163435-irjmxt9", - "updated": "20250331163452" + "updated": "20250801152542" }, "Children": [ { @@ -518,11 +519,12 @@ "Data": "```" }, { - "Type": "NodeCodeBlockFenceInfoMarker" + "Type": "NodeCodeBlockFenceInfoMarker", + "CodeBlockInfo": "dGVtcGxhdGU=" }, { "Type": "NodeCodeBlockCode", - "Data": ".action{getBlock \"20250331163425-s5u08ng\"}\n" + "Data": ".action{ getBlock \"20250331163425-s5u08ng\" }\n" }, { "Type": "NodeCodeBlockFenceCloseMarker", @@ -541,7 +543,7 @@ }, "Properties": { "id": "20211226123024-69kddle", - "updated": "20241224162821" + "updated": "20250801152548" }, "Children": [ { @@ -574,7 +576,7 @@ "Properties": { "id": "20241213215524-9an3khb", "style": "line-height: 22px;", - "updated": "20241224162821" + "updated": "20250801152548" }, "Children": [ { @@ -582,11 +584,12 @@ "Data": "```" }, { - "Type": "NodeCodeBlockFenceInfoMarker" + "Type": "NodeCodeBlockFenceInfoMarker", + "CodeBlockInfo": "dGVtcGxhdGU=" }, { "Type": "NodeCodeBlockCode", - "Data": " .action{querySpans \"SELECT * FROM spans LIMIT ?\" \"3\"}\n" + "Data": ".action{ querySpans \"SELECT * FROM spans LIMIT ?\" \"3\" }\n" }, { "Type": "NodeCodeBlockFenceCloseMarker", @@ -605,7 +608,7 @@ }, "Properties": { "id": "20241213214930-4votv1n", - "updated": "20241213214930" + "updated": "20250801152554" }, "Children": [ { @@ -638,7 +641,7 @@ "Properties": { "id": "20241213215530-f2iwrjz", "style": "line-height: 22px;", - "updated": "20241213215530" + "updated": "20250801152554" }, "Children": [ { @@ -646,11 +649,12 @@ "Data": "```" }, { - "Type": "NodeCodeBlockFenceInfoMarker" + "Type": "NodeCodeBlockFenceInfoMarker", + "CodeBlockInfo": "dGVtcGxhdGU=" }, { "Type": "NodeCodeBlockCode", - "Data": " .action{querySQL \"SELECT * FROM refs LIMIT 3\"}\n" + "Data": ".action{ querySQL \"SELECT * FROM refs LIMIT 3\" }\n" }, { "Type": "NodeCodeBlockFenceCloseMarker", @@ -669,7 +673,7 @@ }, "Properties": { "id": "20241212102019-gassjqt", - "updated": "20241213215707" + "updated": "20250801152602" }, "Children": [ { @@ -702,7 +706,7 @@ "Properties": { "id": "20241213215707-lxpmd6b", "style": "line-height: 22px;", - "updated": "20241213215707" + "updated": "20250801152602" }, "Children": [ { @@ -710,11 +714,12 @@ "Data": "```" }, { - "Type": "NodeCodeBlockFenceInfoMarker" + "Type": "NodeCodeBlockFenceInfoMarker", + "CodeBlockInfo": "dGVtcGxhdGU=" }, { "Type": "NodeCodeBlockCode", - "Data": ".action{ (statBlock .id).RuneCount} .action{ (statBlock .id).WordCount}\n" + "Data": ".action{ (statBlock .id).RuneCount }\n.action{ (statBlock .id).WordCount }\n" }, { "Type": "NodeCodeBlockFenceCloseMarker", @@ -1401,7 +1406,7 @@ "HeadingLevel": 2, "Properties": { "id": "20211226123024-yrgnp4o", - "updated": "20211225221841" + "updated": "20250801152721" }, "Children": [ { @@ -1416,7 +1421,7 @@ "IsFencedCodeBlock": true, "Properties": { "id": "20211226123024-s56q5uh", - "updated": "20211225221841" + "updated": "20250801152721" }, "Children": [ { @@ -1425,15 +1430,11 @@ }, { "Type": "NodeCodeBlockFenceInfoMarker", - "CodeBlockInfo": "cGxhaW50ZXh0" + "CodeBlockInfo": "dGVtcGxhdGU=" }, { - "ID": "20220307092237-cf60m2o", "Type": "NodeCodeBlockCode", - "Data": ".action{$before := (div (now.Sub (toDate \"2006-01-02\" \"2020-02-19\")).Hours 24)}\n\n.action{$after := (div ((toDate \"2006-01-02\" \"2048-02-19\").Sub now).Hours 24)}\n今天是 `.action{now | date \"2006-01-02\"}`。\n\n* 距離 `2020-02-19` 已經過去 `.action{$before}` 天\n* 距離 `2048-02-19` 還剩 `.action{$after}` 天\n", - "Properties": { - "id": "20220307092237-cf60m2o" - } + "Data": ".action{ $before := (div (now.Sub (toDate \"2006-01-02\" \"2020-02-19\")).Hours 24) }\n.action{ $after := (div ((toDate \"2006-01-02\" \"2048-02-19\").Sub now).Hours 24) }\n今天是 `.action{ now | date \"2006-01-02\" }`。\n\n* 距離 `2020-02-19` 已經過去 `.action{ $before }` 天\n* 距離 `2048-02-19` 還剩 `.action{ $after }` 天\n" }, { "Type": "NodeCodeBlockFenceCloseMarker", diff --git a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-6x9ivi7.sy b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-6x9ivi7.sy index 0b6cc40c2..4ebc88291 100644 --- a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-6x9ivi7.sy +++ b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-6x9ivi7.sy @@ -7,7 +7,7 @@ "id": "20240530101000-6x9ivi7", "title": "テンプレートスニペット", "type": "doc", - "updated": "20250331163729" + "updated": "20250801152939" }, "Children": [ { @@ -66,7 +66,7 @@ "Properties": { "ID": "20240530101000-5nvn9ad", "id": "20240530101000-pi05yzt", - "updated": "20250331163729" + "updated": "20250801152922" }, "Children": [ { @@ -226,7 +226,7 @@ "ListData": {}, "Properties": { "id": "20240530101000-by5hqnb", - "updated": "20250331163729" + "updated": "20250801152922" }, "Children": [ { @@ -432,7 +432,7 @@ }, "Properties": { "id": "20240530101000-0y2zlji", - "updated": "20250331163729" + "updated": "20250801152859" }, "Children": [ { @@ -465,7 +465,7 @@ "Properties": { "id": "20241213215628-5gixpmp", "style": "line-height: 22px;", - "updated": "20250331163729" + "updated": "20250801152859" }, "Children": [ { @@ -473,11 +473,12 @@ "Data": "```" }, { - "Type": "NodeCodeBlockFenceInfoMarker" + "Type": "NodeCodeBlockFenceInfoMarker", + "CodeBlockInfo": "dGVtcGxhdGU=" }, { "Type": "NodeCodeBlockCode", - "Data": ".action{$today := now | date \"20060102150405\"}\n.action{$blocks := queryBlocks \"SELECT * FROM blocks WHERE content LIKE '?' AND updated \u003e '?' LIMIT ?\" \"%foo%\" $today \"3\"}\n" + "Data": ".action{ $today := now | date \"20060102150405\" }\n.action{ $blocks := queryBlocks \"SELECT * FROM blocks WHERE content LIKE '?' AND updated \u003e '?' LIMIT ?\" \"%foo%\" $today \"3\" }\n" }, { "Type": "NodeCodeBlockFenceCloseMarker", @@ -496,7 +497,7 @@ }, "Properties": { "id": "20250331163610-n3e9zft", - "updated": "20250331163642" + "updated": "20250801152903" }, "Children": [ { @@ -528,7 +529,7 @@ "IsFencedCodeBlock": true, "Properties": { "id": "20250331163621-j4iofxv", - "updated": "20250331163642" + "updated": "20250801152903" }, "Children": [ { @@ -536,11 +537,12 @@ "Data": "```" }, { - "Type": "NodeCodeBlockFenceInfoMarker" + "Type": "NodeCodeBlockFenceInfoMarker", + "CodeBlockInfo": "dGVtcGxhdGU=" }, { "Type": "NodeCodeBlockCode", - "Data": ".action{getBlock \"20250331163610-n3e9zft\"}\n" + "Data": ".action{ getBlock \"20250331163610-n3e9zft\" }\n" }, { "Type": "NodeCodeBlockFenceCloseMarker", @@ -559,7 +561,7 @@ }, "Properties": { "id": "20240530101000-238ctfi", - "updated": "20241224162728" + "updated": "20250801152909" }, "Children": [ { @@ -592,7 +594,7 @@ "Properties": { "id": "20241213215619-gkqs282", "style": "line-height: 22px;", - "updated": "20241224162728" + "updated": "20250801152909" }, "Children": [ { @@ -600,11 +602,12 @@ "Data": "```" }, { - "Type": "NodeCodeBlockFenceInfoMarker" + "Type": "NodeCodeBlockFenceInfoMarker", + "CodeBlockInfo": "dGVtcGxhdGU=" }, { "Type": "NodeCodeBlockCode", - "Data": " .action{querySpans \"SELECT * FROM spans LIMIT ?\" \"3\"}\n" + "Data": ".action{ querySpans \"SELECT * FROM spans LIMIT ?\" \"3\" }\n" }, { "Type": "NodeCodeBlockFenceCloseMarker", @@ -623,7 +626,7 @@ }, "Properties": { "id": "20241213215009-qrtc56j", - "updated": "20241213215009" + "updated": "20250801152915" }, "Children": [ { @@ -656,7 +659,7 @@ "Properties": { "id": "20241213215633-69ltmv1", "style": "line-height: 22px;", - "updated": "20241213215633" + "updated": "20250801152915" }, "Children": [ { @@ -664,11 +667,12 @@ "Data": "```" }, { - "Type": "NodeCodeBlockFenceInfoMarker" + "Type": "NodeCodeBlockFenceInfoMarker", + "CodeBlockInfo": "dGVtcGxhdGU=" }, { "Type": "NodeCodeBlockCode", - "Data": " .action{querySQL \"SELECT * FROM refs LIMIT 3\"}\n" + "Data": ".action{ querySQL \"SELECT * FROM refs LIMIT 3\" }\n" }, { "Type": "NodeCodeBlockFenceCloseMarker", @@ -687,7 +691,7 @@ }, "Properties": { "id": "20241212102033-rn9u6t8", - "updated": "20241213215720" + "updated": "20250801152922" }, "Children": [ { @@ -720,7 +724,7 @@ "Properties": { "id": "20241213215720-ueqpsna", "style": "line-height: 22px;", - "updated": "20241213215720" + "updated": "20250801152922" }, "Children": [ { @@ -728,11 +732,12 @@ "Data": "```" }, { - "Type": "NodeCodeBlockFenceInfoMarker" + "Type": "NodeCodeBlockFenceInfoMarker", + "CodeBlockInfo": "dGVtcGxhdGU=" }, { "Type": "NodeCodeBlockCode", - "Data": ".action{ (statBlock .id).RuneCount} .action{ (statBlock .id).WordCount}\n" + "Data": ".action{ (statBlock .id).RuneCount }\n.action{ (statBlock .id).WordCount }\n" }, { "Type": "NodeCodeBlockFenceCloseMarker", @@ -1422,7 +1427,7 @@ "Properties": { "ID": "20240530101000-h8k78jq", "id": "20240530101000-3jhyboz", - "updated": "20240530101000" + "updated": "20250801152939" }, "Children": [ { @@ -1436,9 +1441,8 @@ "Type": "NodeCodeBlock", "IsFencedCodeBlock": true, "Properties": { - "ID": "20240530101000-3sja27a", "id": "20240530101000-v44hxz6", - "updated": "20240530101000" + "updated": "20250801152939" }, "Children": [ { @@ -1447,11 +1451,11 @@ }, { "Type": "NodeCodeBlockFenceInfoMarker", - "CodeBlockInfo": "cGxhaW50ZXh0" + "CodeBlockInfo": "dGVtcGxhdGU=" }, { "Type": "NodeCodeBlockCode", - "Data": ".action{$before := (div (now.Sub (toDate \"2006-01-02\" \"2020-02-19\")).Hours 24)}\n\n.action{$after := (div ((toDate \"2006-01-02\" \"2048-02-19\").Sub now).Hours 24)}\n今日は `.action{now | date \"2006-01-02\"}` 日です。\n\n* `2020-02-19` 日から `.action{$before}` 日経過しました\n* `2048-02-19` 日まであと `.action{$after}` 日です\n" + "Data": ".action{ $before := (div (now.Sub (toDate \"2006-01-02\" \"2020-02-19\")).Hours 24) }\n.action{ $after := (div ((toDate \"2006-01-02\" \"2048-02-19\").Sub now).Hours 24) }\n今日は `.action{ now | date \"2006-01-02\" }` 日です。\n\n* `2020-02-19` 日から `.action{ $before }` 日経過しました\n* `2048-02-19` 日まであと `.action{ $after }` 日です\n" }, { "Type": "NodeCodeBlockFenceCloseMarker",