summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--py/repl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/py/repl.c b/py/repl.c
index 4cafb88e2d..d804b9ff4d 100644
--- a/py/repl.c
+++ b/py/repl.c
@@ -67,6 +67,11 @@ bool mp_repl_continue_with_input(const char *input) {
return true;
}
+ // continue if last character was backslash (for line continuation)
+ if (i[-1] == '\\') {
+ return true;
+ }
+
// continue if compound keyword and last line was not empty
if (starts_with_compound_keyword && i[-1] != '\n') {
return true;