fix(boards): 修复xpython下字符串多 "

This commit is contained in:
王立帮
2025-07-07 23:43:20 +08:00
parent 45b38d484b
commit 870b077270

View File

@@ -219,8 +219,8 @@ Python.scrubNakedValue = function (line) {
*/ */
Python.quote_ = function (string) { Python.quote_ = function (string) {
// Can't use goog.string.quote since % must also be escaped. // Can't use goog.string.quote since % must also be escaped.
string = string.replace(/\\/g, '\\\\') // string = string.replace(/\\/g, '\\\\')
.replace(/\n/g, '\\\n'); // .replace(/\n/g, '\\\n');
// Follow the CPython behaviour of repr() for a non-byte string. // Follow the CPython behaviour of repr() for a non-byte string.
var quote = '\''; var quote = '\'';