aboutsummaryrefslogtreecommitdiffstats
path: root/global-functions.rsc
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2024-01-19 23:57:09 +0100
committerGravatar Christian Hesse <mail@eworm.de>2024-01-20 00:11:22 +0100
commit75a39ffaf1d8fb13e56d790d3902e2dbd0cabba6 (patch)
tree828dbb044dcb6fc57c678ec80fd2b0efb72632bf /global-functions.rsc
parent86a0700efd926d0481b8518c62b217972fca4045 (diff)
global-functions: $SymbolByUnicodeName: log warning on missing name
Diffstat (limited to 'global-functions.rsc')
-rw-r--r--global-functions.rsc7
1 files changed, 7 insertions, 0 deletions
diff --git a/global-functions.rsc b/global-functions.rsc
index 8552502..1109043 100644
--- a/global-functions.rsc
+++ b/global-functions.rsc
@@ -1295,6 +1295,8 @@
:set SymbolByUnicodeName do={
:local Name [ :tostr $1 ];
+ :global LogPrintOnce;
+
:local Symbols {
"abacus"="\F0\9F\A7\AE";
"alarm-clock"="\E2\8F\B0";
@@ -1328,6 +1330,11 @@
"white-heavy-check-mark"="\E2\9C\85"
}
+ :if ([ :len ($Symbols->$Name) ] = 0) do={
+ $LogPrintOnce warning $0 ("No symbol available for name '" . $Name . "'!") false;
+ :return "";
+ }
+
:return (($Symbols->$Name) . "\EF\B8\8F");
}