You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 27, 2021. It is now read-only.
If I try to put a $ literal in a label, it complains about action stuff. Escaping with a backslash doesn't seem to work either. I "fixed" it by setting a label's text to $ from Java every frame. It seems like it should be possible to escape it, no? HTML entities don't work either.
The text was updated successfully, but these errors were encountered:
Use a .properties file, put your special characters there. Then you can reference it like any other localized text. For example - in bundle file: dol=$
In .lml file: <label>@dol</label>
Bundle texts (proceeded with @) are preferred over plain text in templates anyway, so I don't think that it's much of an issue. Also, you can replace default characters by overriding DefaultLmlSyntax methods; if you don't use actions much, you can select another, more unusual character.
For the record, LML 1.5.1.9.2 will allow using a single restricted character, as these cannot be properly parsed to property names, bundle lines or actions anyway. So - for example - it wouldn't throw any exceptions if you used $ sign as label.
Restricted characters cannot begin a string. For example, <label>hi$</label> would work just fine, while <label>$hi</label> would look for a method named hi, try to invoke it and put the result in its place. That's why there is no character escaping. If you need to begin a text value (longer than 1) with a restricted character, use i18n bundle.
If I try to put a $ literal in a label, it complains about action stuff. Escaping with a backslash doesn't seem to work either. I "fixed" it by setting a label's text to $ from Java every frame. It seems like it should be possible to escape it, no? HTML entities don't work either.
The text was updated successfully, but these errors were encountered: