Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Improve slash hint behavior inside tags https://github.com/siyuan-note/siyuan/issues/18988

Danielcf50097b09c6
diff --git a/app/src/protyle/hint/index.ts b/app/src/protyle/hint/index.ts
index 9c4328cc2f..cbe9f28485 100644
--- a/app/src/protyle/hint/index.ts
+++ b/app/src/protyle/hint/index.ts
@@ -249,7 +249,9 @@ export class Hint {
const key = this.getKey(currentLineValue, textAfterCaret, protyle.options.hint.extend);
if (typeof key === "undefined" ||
hasClosestByAttribute(protyle.toolbar.range.startContainer, "data-type", "code") ||
- hasClosestByAttribute(protyle.toolbar.range.startContainer, "data-type", "NodeCodeBlock")) {
+ hasClosestByAttribute(protyle.toolbar.range.startContainer, "data-type", "NodeCodeBlock") ||
+ (["/", "、"].includes(this.splitChar) &&
+ hasClosestByAttribute(protyle.toolbar.range.startContainer, "data-type", "tag"))) {
this.element.classList.add("fn__none");
clearTimeout(this.timeId);
return;