mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:57:44 +00:00
GMLCompiler: Fix bug where backslash in escaped sequence was preserved
This commit is contained in:
parent
6265c544f9
commit
a4e272d2c8
1 changed files with 1 additions and 1 deletions
|
@ -145,10 +145,10 @@ static ErrorOr<String> escape_string(JsonValue to_escape)
|
|||
// All C++ simple escape sequences; see https://en.cppreference.com/w/cpp/language/escape
|
||||
// Other commonly-escaped characters are hard-to-type Unicode and therefore fine to include verbatim in UTF-8 coded strings.
|
||||
static HashMap<StringView, StringView> escape_sequences = {
|
||||
{ "\\"sv, "\\\\"sv }, // This needs to be the first because otherwise the the backslashes of other items will be double escaped
|
||||
{ "\0"sv, "\\0"sv },
|
||||
{ "\'"sv, "\\'"sv },
|
||||
{ "\""sv, "\\\""sv },
|
||||
{ "\\"sv, "\\\\"sv },
|
||||
{ "\a"sv, "\\a"sv },
|
||||
{ "\b"sv, "\\b"sv },
|
||||
{ "\f"sv, "\\f"sv },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue