Vanessa 2022-11-11 10:58:16 +08:00
parent 694ba7108d
commit 6a31ab85aa

View file

@ -759,7 +759,7 @@ export const linkMenu = (protyle: IProtyle, linkElement: HTMLElement, focusText
inputElement.addEventListener("input", (event: KeyboardEvent) => {
if (!event.isComposing) {
// https://github.com/siyuan-note/siyuan/issues/4511
linkElement.innerHTML = Lute.EscapeHTMLStr(inputElement.value).replace(/\\]/g, '<span data-type="backslash"><span>\\</span>]</span>').replace(/\\\[/g, '<span data-type="backslash"><span>\\</span>[</span>') || "";
linkElement.innerHTML = Lute.EscapeHTMLStr(inputElement.value) || "";
}
});
inputElement.addEventListener("keydown", (event) => {