Skip to content

Commit

Permalink
🎨 fix #11851
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Jun 29, 2024
1 parent a1fa1d1 commit 7dbc546
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/src/protyle/wysiwyg/input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ export const input = async (protyle: IProtyle, blockElement: HTMLElement, range:
}
}
const id = blockElement.getAttribute("data-node-id");
if (type !== "NodeCodeBlock" && (editElement.innerHTML.endsWith("\n<wbr>") || editElement.innerHTML.endsWith("\n<wbr>\n"))) {
if ((type !== "NodeCodeBlock" && type !== "NodeHeading") && // https://github.com/siyuan-note/siyuan/issues/11851
(editElement.innerHTML.endsWith("\n<wbr>") || editElement.innerHTML.endsWith("\n<wbr>\n"))) {
// 软换行
updateTransaction(protyle, id, blockElement.outerHTML, protyle.wysiwyg.lastHTMLs[id] || blockElement.outerHTML.replace("\n<wbr>", "<wbr>"));
wbrElement.remove();
Expand Down

0 comments on commit 7dbc546

Please sign in to comment.