From 7e3f4d52ab1156c3ea51f33913268187610d7c4f Mon Sep 17 00:00:00 2001 From: Ronald Tse Date: Wed, 30 Sep 2026 22:47:18 +0800 Subject: [PATCH] fix: Stdlib charset aliases stay Alias nodes in class context MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit resolve_charset never consulted Stdlib, so digit/boundary-style aliases in constraints degraded to vacuous fragments — moct-kor and the rok-2011 maps never inserted the space before digits ("평리1동" -> "Pyeongniil-dong" instead of "Pyeongni Il-dong"). Resolving Stdlib values through the Any path also escaped their regex fragments ([\\d] would match a literal backslash or d) — Stdlib aliases resolve to Alias nodes, which the runtimes interpolate raw. --- lib/interscript/isc/node_adapter.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/interscript/isc/node_adapter.rb b/lib/interscript/isc/node_adapter.rb index 18f05352..804366af 100644 --- a/lib/interscript/isc/node_adapter.rb +++ b/lib/interscript/isc/node_adapter.rb @@ -246,7 +246,13 @@ def resolve_charset(name) @resolving << name node = - if (imp = @imported[name]) + # Stdlib alias values are regex fragments ("\d", "\b") — + # keep them as Alias nodes so the runtimes interpolate them raw; + # wrapping in Any escapes the backslashes ([\\d] matches a + # literal backslash or d). + if Interscript::Stdlib::ALIASES.key?(name) + Interscript::Node::Item::Alias.new(name) + elsif (imp = @imported[name]) data = imp.data case data when Interscript::Node::Item::Any