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
BrighterScript is not properly handling all common escape sequences correctly. For example, the tab sequence \t is escaping to literal char code 116 which is the t character.
We should support the same escape sequences as in javascript. Some of the sequences from that link are unnecessary due to how brightscript strings, so here's the revised list of what needs to be supported in brighterscript template strings:
Escape sequence
Unicode code point
\0
null character (U+0000 NULL)
\\
backslash (U+005C REVERSE SOLIDUS)
\n
newline (U+000A LINE FEED; LF)
\r
carriage return (U+000D CARRIAGE RETURN; CR)
\v
vertical tab (U+000B LINE TABULATION)
\t
tab (U+0009 CHARACTER TABULATION)
\b
backspace (U+0008 BACKSPACE)
\f
form feed (U+000C FORM FEED)
\`
backtick char (U+0060 UNICODE CHAR “`”)
Am I missing anything?
This is probably a breaking change, but I full expect that developers who typed \t intended to insert a tab, so we could probably just fix this in the v0 line with minimal risk.
The text was updated successfully, but these errors were encountered:
BrighterScript is not properly handling all common escape sequences correctly. For example, the tab sequence
\t
is escaping to literal char code 116 which is thet
character.We should support the same escape sequences as in javascript. Some of the sequences from that link are unnecessary due to how brightscript strings, so here's the revised list of what needs to be supported in brighterscript template strings:
\0
\\
\n
\r
\v
\t
\b
\f
\`
Am I missing anything?
This is probably a breaking change, but I full expect that developers who typed
\t
intended to insert a tab, so we could probably just fix this in the v0 line with minimal risk.The text was updated successfully, but these errors were encountered: