Skip to content

Commit 7e3f4d5

Browse files
committed
fix: Stdlib charset aliases stay Alias nodes in class context
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.
1 parent 837c97e commit 7e3f4d5

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎lib/interscript/isc/node_adapter.rb‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,13 @@ def resolve_charset(name)
246246

247247
@resolving << name
248248
node =
249-
if (imp = @imported[name])
249+
# Stdlib alias values are regex fragments ("\d", "\b") —
250+
# keep them as Alias nodes so the runtimes interpolate them raw;
251+
# wrapping in Any escapes the backslashes ([\\d] matches a
252+
# literal backslash or d).
253+
if Interscript::Stdlib::ALIASES.key?(name)
254+
Interscript::Node::Item::Alias.new(name)
255+
elsif (imp = @imported[name])
250256
data = imp.data
251257
case data
252258
when Interscript::Node::Item::Any

0 commit comments

Comments
 (0)