8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f7d4d85 commit f25344eCopy full SHA for f25344e
micropython.js
@@ -12,9 +12,9 @@ function sleep(millis) {
12
}
13
14
function escape_string(string) {
15
- string = string.replace(/"""/g, `\\"\\"\\"`)
16
string = string.replace(/\'/g, `\\'`)
17
string = string.replace(/\"/g, `\\"`)
+ string = string.replace(/"""/g, `\\"\\"\\"`)
18
return string
19
20
@@ -249,7 +249,7 @@ class MicroPythonBoard {
249
})
250
await sleep(100)
251
for (let i = 0; i < content.length; i+=128) {
252
- let slice = content.slice(i, i+128)
+ let slice = content.subarray(i, i+128)
253
slice = slice.toString()
254
slice = escape_string(slice)
255
await this.serial.write(`w("""${slice}""")`)
0 commit comments