-
Notifications
You must be signed in to change notification settings - Fork 154
Not escaping multiline strings correctly #1
Copy link
Copy link
Open
Description
When I have a multiline string, "Save to ESP" fails. Example:
print([[Hello
World]])
I can execute it, but when I save it I get this:
> SENT: file.remove("delme.lua")
SENT: file.open("delme.lua","w")
SENT: file.writeline([[print([[Hello]])
SENT: file.writeline([[World]])]])
SENT: file.close()
file.remove("delme.lua")
> file.open("delme.lua","w")
> file.writeline([[print([[Hello]])
stdin:1: nesting of [[...]] is deprecated near '['
> file.writeline([[World]])]])
stdin:1: unexpected symbol near ']'
> file.close()
I think the problem is in https://github.com/hwiguna/g33k/blob/master/ArduinoProjects/Windows/ESP8266_Related/LuaUploader/SerialPort/Form1.cs line 211:
stringBuilder.AppendLine("file.writeline([[" + line + "]])");
You may want to check if there's anything else that should be escaped.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels