From e77cdc2903d7a9860ebf0481dfe8d38356e9b89d Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Thu, 30 Oct 2025 02:59:47 +0100 Subject: [PATCH] fix: emdash replacement conflicts with horizontal rule (#10515) --- app/editor/extensions/SmartText.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/editor/extensions/SmartText.ts b/app/editor/extensions/SmartText.ts index 4090cb8c9a..6a34831efb 100644 --- a/app/editor/extensions/SmartText.ts +++ b/app/editor/extensions/SmartText.ts @@ -3,7 +3,7 @@ import { InputRule } from "@shared/editor/lib/InputRule"; const rightArrow = new InputRule(/->$/, "→"); // Note that the suppression of pipe here prevents conflict with table creation rule. -const emdash = new InputRule(/(?:^|[^\|])(--)$/, "—"); +const emdash = new InputRule(/(?:^|[^\|])(--\s)$/, "— "); const oneHalf = new InputRule(/(?:^|\s)(1\/2)$/, "½"); const threeQuarters = new InputRule(/(?:^|\s)(3\/4)$/, "¾"); const copyright = new InputRule(/\(c\)$/, "©️");