Skip to content

Commit

Permalink
Fixed custom commands escaping (#955)
Browse files Browse the repository at this point in the history
  • Loading branch information
deepnight committed Sep 22, 2023
1 parent 6f8ca0c commit d798e16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/electron.renderer/data/Project.hx
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ class Project {
p.tutorialDesc = JsonTools.unescapeString(json.tutorialDesc);
p.customCommands = JsonTools.readArray(json.customCommands, []).map( (cmdJson:ldtk.Json.CustomCommand)->{
return {
command: cmdJson.command,
command: JsonTools.unescapeString(cmdJson.command),
when: JsonTools.readEnum(ldtk.Json.CustomCommandTrigger, cmdJson.when, false, Manual),
}
});
Expand Down Expand Up @@ -639,7 +639,7 @@ class Project {
levelNamePattern: levelNamePattern,
tutorialDesc : JsonTools.escapeString(tutorialDesc),
customCommands: customCommands.map(cmd->{
command: cmd.command,
command: JsonTools.escapeString(cmd.command),
when: JsonTools.writeEnum(cmd.when, false),
}),

Expand Down

0 comments on commit d798e16

Please # to comment.