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