From 07bede8ba26899181a3a6779ef38678517363bc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bel=C3=A9n=20Albeza?= Date: Wed, 12 Nov 2025 10:11:19 +0100 Subject: [PATCH] :bug: Fix unicode ranges for codepoints that need surrogate pairs --- frontend/src/app/render_wasm/api.cljs | 6 +++--- frontend/src/app/render_wasm/api/texts.cljs | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/frontend/src/app/render_wasm/api.cljs b/frontend/src/app/render_wasm/api.cljs index 464cac7695..c3a6b56ab6 100644 --- a/frontend/src/app/render_wasm/api.cljs +++ b/frontend/src/app/render_wasm/api.cljs @@ -912,11 +912,11 @@ (->> (rx/concat (->> (rx/from pending-thumbnails) (rx/merge-map (fn [callback] (callback))) - (rx/reduce conj []) - (rx/tap #(.dispatchEvent ^js js/document event))) + (rx/reduce conj [])) (->> (rx/from pending-full) (rx/mapcat (fn [callback] (callback))) - (rx/reduce conj []))) + (rx/reduce conj []) + (rx/tap #(.dispatchEvent ^js js/document event)))) (rx/subs! (fn [_] (update-text-layouts shapes) diff --git a/frontend/src/app/render_wasm/api/texts.cljs b/frontend/src/app/render_wasm/api/texts.cljs index 79eefd7668..b2698bf39b 100644 --- a/frontend/src/app/render_wasm/api/texts.cljs +++ b/frontend/src/app/render_wasm/api/texts.cljs @@ -198,20 +198,20 @@ :coptic #"[\u2C80-\u2CFF]" :ol-chiki #"[\u1C50-\u1C7F]" :vai #"[\uA500-\uA63F]" - :shavian #"[\u10450-\u1047F]" - :osmanya #"[\u10480-\u104AF]" + :shavian #"\uD801[\uDC50-\uDC7F]" + :osmanya #"\uD801[\uDC80-\uDCAF]" :runic #"[\u16A0-\u16FF]" - :old-italic #"[\u10300-\u1032F]" - :brahmi #"[\u11000-\u1107F]" - :modi #"[\u11600-\u1165F]" - :sora-sompeng #"[\u110D0-\u110FF]" + :old-italic #"\uD800[\uDF00-\uDF2F]" + :brahmi #"\uD804[\uDC00-\uDC7F]" + :modi #"\uD805[\uDE00-\uDE5F]" + :sora-sompeng #"\uD804[\uDCD0-\uDCFF]" :bamum #"[\uA6A0-\uA6FF]" - :meroitic #"[\u10980-\u1099F]" + :meroitic #"\uD802[\uDD80-\uDD9F]" ;; Arrows, Mathematical Operators, Misc Technical, Geometric Shapes, Misc Symbols, Dingbats, Supplemental Arrows, etc. :symbols #"[\u2190-\u21FF\u2200-\u22FF\u2300-\u23FF\u25A0-\u25FF\u2600-\u26FF\u2700-\u27BF\u2B00-\u2BFF]" ;; Additional arrows, math, technical, geometric, and symbol blocks :symbols-2 #"[\u2190-\u21FF\u2200-\u22FF\u2300-\u23FF\u25A0-\u25FF\u2600-\u26FF\u2700-\u27BF\u2B00-\u2BFF]" - :music #"[\u2669-\u267B\u1D100-\u1D1FF]"}) + :music #"[\u2669-\u267B]|\uD834[\uDD00-\uDD1F]"}) (defn contains-emoji? [text] (let [result (re-find emoji-pattern text)]