An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:bug: 光标定位到行内元素内部时粘贴为纯文本不应带标记符 https://github.com/siyuan-note/insider/issues/1057
Liang Ding106a8db6160c
diff --git a/app/pnpm-lock.yaml b/app/pnpm-lock.yamlindex cd45f4b2ae..eed988a4fb 100644--- a/app/pnpm-lock.yaml+++ b/app/pnpm-lock.yaml@@ -1906,10 +1906,10 @@ packages:resolution: {integrity: sha512-m0+M53+HYMzqKxwNQZT143K7WwXEGUy9LY31l8dJphXx2P/FQod615mVbxHyqbDCG4J5bHdWm21qZ0e2DVY6CQ==}engines: {node: '>=14.0.0'}dependencies:+ 7zip-bin: 5.1.1'@develar/schema-utils': 2.6.5'@electron/universal': 1.2.1'@malept/flatpak-bundler': 0.4.0- 7zip-bin: 5.1.1async-exit-hook: 2.0.1bluebird-lst: 1.0.9builder-util: 23.3.3@@ -2193,9 +2193,9 @@ packages:/builder-util/23.3.3:resolution: {integrity: sha512-MJZlUiq2PY5hjYv9+XNaoYdsITqvLgRDoHSFg/4nzpInbNxNjLQOolL04Zsyp+hgfcbFvMC4h0KkR1CMPHLWbA==}dependencies:+ 7zip-bin: 5.1.1'@types/debug': 4.1.7'@types/fs-extra': 9.0.13- 7zip-bin: 5.1.1app-builder-bin: 4.0.0bluebird-lst: 1.0.9builder-util-runtime: 9.0.3diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.tsindex d097b4fefe..c25846e384 100644--- a/app/src/menus/protyle.ts+++ b/app/src/menus/protyle.ts@@ -510,7 +510,7 @@ export const imgMenu = (protyle: IProtyle, range: Range, assetElement: HTMLElemeaccelerator: "⌘C",icon: "iconCopy",click() {- writeText(protyle.lute.BlockDOM2Md(assetElement.outerHTML));+ writeText(protyle.lute.BlockDOM2StdMd(assetElement.outerHTML));}}).element);window.siyuan.menus.menu.append(new MenuItem({@@ -548,7 +548,7 @@ export const imgMenu = (protyle: IProtyle, range: Range, assetElement: HTMLElemeaccelerator: "⌘X",label: window.siyuan.languages.cut,click() {- writeText(protyle.lute.BlockDOM2Md(assetElement.outerHTML));+ writeText(protyle.lute.BlockDOM2StdMd(assetElement.outerHTML));(assetElement as HTMLElement).outerHTML = "<wbr>";nodeElement.setAttribute("updated", dayjs().format("YYYYMMDDHHmmss"));updateTransaction(protyle, id, nodeElement.outerHTML, html);diff --git a/app/src/types/protyle.d.ts b/app/src/types/protyle.d.tsindex fe38541ed0..77a960fa0c 100644--- a/app/src/types/protyle.d.ts+++ b/app/src/types/protyle.d.ts@@ -199,8 +199,6 @@ declare class Lute {public PutEmojis(emojis: IObject): void;- public BlockDOM2Md(html: string): string;-public SpinBlockDOM(html: string): string;public Md2BlockDOM(html: string): string;diff --git a/kernel/go.mod b/kernel/go.modindex ec0e9746ba..062b103b17 100644--- a/kernel/go.mod+++ b/kernel/go.mod@@ -7,7 +7,7 @@ require (github.com/88250/css v0.1.2github.com/88250/flock v0.8.2github.com/88250/gulu v1.2.3-0.20220916075322-eb117059d70a- github.com/88250/lute v1.7.5-0.20220919023317-f20f5cef5f56+ github.com/88250/lute v1.7.5-0.20220919070155-de3fd729795bgithub.com/88250/pdfcpu v0.3.13github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1github.com/ConradIrwin/font v0.0.0-20210318200717-ce8d41cc0732diff --git a/kernel/go.sum b/kernel/go.sumindex 36d82f91ac..abdbeadb00 100644--- a/kernel/go.sum+++ b/kernel/go.sum@@ -27,6 +27,8 @@ github.com/88250/lute v1.7.5-0.20220919015919-e05391a106b3 h1:F78DnfTxvC2ugvvt17github.com/88250/lute v1.7.5-0.20220919015919-e05391a106b3/go.mod h1:cEoBGi0zArPqAsp0MdG9SKinvH/xxZZWXU7sRx8vHSA=github.com/88250/lute v1.7.5-0.20220919023317-f20f5cef5f56 h1:I3kvJm2iO9VhFTGChKaOASrRgMmnVhGgYrsUE0gXHyY=github.com/88250/lute v1.7.5-0.20220919023317-f20f5cef5f56/go.mod h1:cEoBGi0zArPqAsp0MdG9SKinvH/xxZZWXU7sRx8vHSA=+github.com/88250/lute v1.7.5-0.20220919070155-de3fd729795b h1:dTuGmFlpbZ7SmdnkrBa9onRJBB68EUI2ARnVe4FveTM=+github.com/88250/lute v1.7.5-0.20220919070155-de3fd729795b/go.mod h1:cEoBGi0zArPqAsp0MdG9SKinvH/xxZZWXU7sRx8vHSA=github.com/88250/pdfcpu v0.3.13 h1:touMWMZkCGalMIbEg9bxYp7rETM+zwb9hXjwhqi4I7Q=github.com/88250/pdfcpu v0.3.13/go.mod h1:S5YT38L/GCjVjmB4PB84PymA1qfopjEhfhTNQilLpv4=github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1 h1:48T899JQDwyyRu9yXHePYlPdHtpJfrJEUGBMH3SMBWY=