Describe the bug
When a sprite with a backtick (`) as its key is placed using the map editor, the editor places the backtick unescaped, ending the string literal causing invalid syntax which is not obvious until closing the map editor.
To Reproduce
Steps to reproduce the behavior:
Add a sprite with a backtick as a key to the legend
Add the sprite to a map in the map editor
Expected behavior
The sprite is placed on the map without breaking syntax, possibly through escaping the backtick.
Actual behavior
The backtick is placed in string and terminates the string early.
Since escaping characters means that 1 character may not always = 1 tile, it might be better to just prevent using backtick for a sprite key.
(A separate issue where the map clicked on to edit is not the one that ends up being edited is also exhibited in the video but is not the subject of this issue.)
Describe the bug When a sprite with a backtick (
`
) as its key is placed using the map editor, the editor places the backtick unescaped, ending the string literal causing invalid syntax which is not obvious until closing the map editor.To Reproduce Steps to reproduce the behavior:
Expected behavior The sprite is placed on the map without breaking syntax, possibly through escaping the backtick.
Actual behavior
The backtick is placed in string and terminates the string early.
Screenshots
https://github.com/user-attachments/assets/efd36695-f586-497f-a4b7-77726b619ff2
Since escaping characters means that 1 character may not always = 1 tile, it might be better to just prevent using backtick for a sprite key.
(A separate issue where the map clicked on to edit is not the one that ends up being edited is also exhibited in the video but is not the subject of this issue.)