blockly-fluid 1.2.15 → 1.2.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +4 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -75,7 +75,7 @@ module.exports = (Blockly, { generator: languageGeneratorFallback, generators: l
|
|
|
75
75
|
output: true,
|
|
76
76
|
|
|
77
77
|
generator: ({ DROPDOWN }) => [
|
|
78
|
-
`"${DROPDOWN.replaceAll(
|
|
78
|
+
`"${DROPDOWN.replaceAll("\\", "\\\\").replaceAll(`"`, `\\"`)}"`,
|
|
79
79
|
"atomic"
|
|
80
80
|
]
|
|
81
81
|
};
|
|
@@ -141,6 +141,8 @@ module.exports = (Blockly, { generator: languageGeneratorFallback, generators: l
|
|
|
141
141
|
...(field.validator) ? [field.validator] : []
|
|
142
142
|
]), token);
|
|
143
143
|
|
|
144
|
+
if (field.default) this.setFieldValue((typeof field.default === "function") ? field.default() : field.default, token);
|
|
145
|
+
|
|
144
146
|
break;
|
|
145
147
|
case "variable":
|
|
146
148
|
dummy.appendField(new Blockly.FieldVariable(...[
|
|
@@ -298,7 +300,7 @@ module.exports = (Blockly, { generator: languageGeneratorFallback, generators: l
|
|
|
298
300
|
output: true,
|
|
299
301
|
|
|
300
302
|
generator: ({ TEXT }) => [
|
|
301
|
-
`"${TEXT.replaceAll(
|
|
303
|
+
`"${TEXT.replaceAll("\\", "\\\\").replaceAll(`"`, `\\"`)}"`,
|
|
302
304
|
"atomic"
|
|
303
305
|
]
|
|
304
306
|
};
|