mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-26 19:38:48 +01:00
This commit is contained in:
parent
dd0902654c
commit
72e1ed2ebb
1 changed files with 2 additions and 2 deletions
|
|
@ -731,10 +731,10 @@ export const keydown = (app: App, protyle: IProtyle, editorElement: HTMLElement)
|
|||
}
|
||||
}
|
||||
// 行首转义符前删除 https://github.com/siyuan-note/siyuan/issues/6092
|
||||
if (range.startOffset === 0 &&
|
||||
if (range.startOffset === 0 && selectText === "" &&
|
||||
previousSibling && previousSibling.parentElement.getAttribute("data-type")?.indexOf("backslash") > -1 &&
|
||||
previousSibling.nodeType !== 3 && (previousSibling as HTMLElement).outerHTML === "<span>\\</span>" &&
|
||||
!hasPreviousSibling(previousSibling)) {
|
||||
!hasPreviousSibling(previousSibling.parentElement)) {
|
||||
range.setStartBefore(previousSibling.parentElement);
|
||||
removeBlock(protyle, nodeElement, range);
|
||||
event.stopPropagation();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue