Closed benoit-adobe closed 3 years ago
but the runtime globals are user defined and should be valid variable names. it would be weird if the htlengine would to any transformation to it.
is there a requirement?
It is not a requirement, but I discover that the hard way as I did not know it was supposed to be a valid variable name and though instead that it was a namespace
type of variable.
well, you can't even use it in HTL, eg ${foo-bar}
is not a valid identifier.
Fair enough then...
If the compiler is created with a global name using
<compiler instance>.withRuntimeGlobalName(<name>)
and that the name contains special characters (or a hyphen for instance), it breaks the compiler.The global name is not formatted or rejected if invalid and then set in the generated JS here.