This commit is contained in:
Vanessa 2022-09-02 23:29:07 +08:00
parent a5a1948cee
commit a075c7380c

View file

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