diff --git a/app/src/protyle/hint/index.ts b/app/src/protyle/hint/index.ts index a4b14fd50..eeef83792 100644 --- a/app/src/protyle/hint/index.ts +++ b/app/src/protyle/hint/index.ts @@ -162,6 +162,19 @@ ${unicode2Emoji(emoji.unicode, true)}`; return; } + // https://github.com/siyuan-note/siyuan/issues/7933 + if (this.splitChar === "#" ) { + const blockElement = hasClosestBlock(protyle.toolbar.range.startContainer); + if (blockElement && blockElement.getAttribute("data-type") === "NodeHeading") { + const blockIndex = getSelectionOffset(protyle.toolbar.range.startContainer, blockElement).start + if (blockElement.textContent.startsWith("#".repeat(blockIndex))) { + this.element.classList.add("fn__none"); + clearTimeout(this.timeId); + return; + } + } + } + if (this.splitChar === ":") { clearTimeout(this.timeId); if (key) {