Skip to content

Commit

Permalink
fix(protyle): #13590
Browse files Browse the repository at this point in the history
  • Loading branch information
TCOTC committed Dec 23, 2024
1 parent 11b02fd commit 182e9b2
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions app/src/protyle/wysiwyg/input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,10 @@ export const input = async (protyle: IProtyle, blockElement: HTMLElement, range:
return;
}
// https://github.com/siyuan-note/siyuan/issues/9015
if (trimStartText === "¥¥<wbr>" || trimStartText === "¥¥<wbr>") {
editElement.innerHTML = "$$<wbr>";
} else if (trimStartText.indexOf("\n¥¥<wbr>") > -1 || trimStartText.indexOf("\n¥¥<wbr>") > -1) {
// https://ld246.com/article/1730020516427
editElement.innerHTML = trimStartText.replace("\n¥¥<wbr>", "\n$$$$<wbr>").replace("\n¥¥<wbr>", "\n$$$$<wbr>");
if (type !== "NodeHeading" &&
(editElement.innerHTML.startsWith("¥¥<wbr>") || editElement.innerHTML.startsWith("¥¥<wbr>") ||
trimStartText.indexOf("\n¥¥<wbr>") > -1 || trimStartText.indexOf("\n¥¥<wbr>") > -1)) {
editElement.innerHTML = editElement.innerHTML.replace("¥¥<wbr>", "$$$$<wbr>").replace("¥¥<wbr>", "$$$$<wbr>");
}
const refElement = hasClosestByAttribute(range.startContainer, "data-type", "block-ref");
if (refElement && refElement.getAttribute("data-subtype") === "d") {
Expand Down

0 comments on commit 182e9b2

Please sign in to comment.