From ed3dfa735f3cbdfcd8e7c2aa5c067eabb50f7ceb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E7=AB=8B=E5=B8=AE?= <3294713004@qq.com> Date: Sun, 6 Jul 2025 08:36:37 +0800 Subject: [PATCH] =?UTF-8?q?fix(boards):=20=E4=BF=AE=E5=A4=8Dxpython?= =?UTF-8?q?=E4=B8=8B=E6=8D=A2=E8=A1=8C=E7=AC=A6=E8=87=AA=E5=8A=A8=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=20`\`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- boards.json | 2 +- boards/default_src/python/generators/text.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/boards.json b/boards.json index e3bf0429..e7cf8b1a 100644 --- a/boards.json +++ b/boards.json @@ -209,7 +209,7 @@ "boardIndex": "./boards/default/arduino_esp32/index.xml", "env": { "electron": true, - "web": false, + "web": true, "webCompiler": true, "webSocket": true }, diff --git a/boards/default_src/python/generators/text.js b/boards/default_src/python/generators/text.js index 6b0cc455..d23d7087 100644 --- a/boards/default_src/python/generators/text.js +++ b/boards/default_src/python/generators/text.js @@ -3,7 +3,8 @@ import * as Blockly from 'blockly/core'; export const text = function (_, generator) { // Text value. //var code = 'String('+generator.quote_(this.getFieldValue('TEXT'))+')'; - var code = generator.quote_(this.getFieldValue('TEXT')); + // var code = generator.quote_(this.getFieldValue('TEXT')); + var code = `"${this.getFieldValue('TEXT')}"`; return [code, generator.ORDER_ATOMIC]; }