Skip to content

Commit

Permalink
fix: double quotes not being escaped in text block (#117)
Browse files Browse the repository at this point in the history
* fix: double quotes not being escaped in text block

---------

Co-authored-by: Ronald Moesbergen <[email protected]>
  • Loading branch information
pajotg and rmoesbergen authored Jul 16, 2024
1 parent df6ceda commit 016c13b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"dist",
"media"
],
"version": "3.2.0",
"version": "3.2.1",
"description": "Leaphy custom Blockly blocks and arduino code generator",
"name": "@leaphy-robotics/leaphy-blocks"
}
1 change: 1 addition & 0 deletions src/generators/arduino.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ export class Arduino extends Blockly.Generator {
.replace(/\\/g, "\\\\")
.replace(/\n/g, "\\\n")
.replace(/\$/g, "\\$")
.replace(/"/g, '\\"')
.replace(/'/g, "\\'");
return '"' + string + '"';
}
Expand Down

0 comments on commit 016c13b

Please sign in to comment.