From 10aa4f4facfb3149e02136fec2adeb0136d3eac3 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Tue, 25 Feb 2025 19:58:48 -0500 Subject: [PATCH] fix: Fractional smart text replacements also lose preceding space --- app/editor/extensions/SmartText.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/editor/extensions/SmartText.ts b/app/editor/extensions/SmartText.ts index cdc6828347..4ed503ad8e 100644 --- a/app/editor/extensions/SmartText.ts +++ b/app/editor/extensions/SmartText.ts @@ -3,8 +3,8 @@ import { InputRule } from "@shared/editor/lib/InputRule"; const rightArrow = new InputRule(/->$/, "→"); const emdash = new InputRule(/--$/, "—"); -const oneHalf = new InputRule(/(?:^|\s)1\/2$/, "½"); -const threeQuarters = new InputRule(/(?:^|\s)3\/4$/, "¾"); +const oneHalf = new InputRule(/(?:^|\s)(1\/2)$/, "½"); +const threeQuarters = new InputRule(/(?:^|\s)(3\/4)$/, "¾"); const copyright = new InputRule(/\(c\)$/, "©️"); const registered = new InputRule(/\(r\)$/, "®️"); const trademarked = new InputRule(/\(tm\)$/, "™️");