From 6198ed4e9bcf9103e6e5e947c552e6588fa4978f Mon Sep 17 00:00:00 2001 From: lorp Date: Mon, 20 Nov 2023 03:07:47 +0000 Subject: [PATCH] Allow entry by Unicode id in string filter box --- src/samsa-gui.html | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/samsa-gui.html b/src/samsa-gui.html index 4595182..6ab33ed 100644 --- a/src/samsa-gui.html +++ b/src/samsa-gui.html @@ -3853,9 +3853,15 @@

Glyph info

let filter = Q("#string-filter").value; let glyphIds = []; - for (let c=0; c String.fromCodePoint(parseInt(p1, 16))); // U+20ac + filter = filter.replace(/u([0-9a-fA-F]{4,5})/g, (match, p1) => String.fromCodePoint(parseInt(p1, 16))); // u20ac + filter = filter.replace(/\&#x([0-9a-fA-F]{1,5});/g, (match, p1) => String.fromCodePoint(parseInt(p1, 16))); // € + filter = filter.replace(/\&#([0-9]{1,5});/g, (match, p1) => String.fromCodePoint(parseInt(p1))); // € + + for (let c=0; c