From 73c79b992508ac3a72212d91db2eb5a8dd1aa60f Mon Sep 17 00:00:00 2001
From: Damien George <damien.p.george@gmail.com>
Date: Tue, 8 Apr 2014 11:33:28 +0000
Subject: [PATCH] py: Continue line if last character is backslash.

---
 py/repl.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/py/repl.c b/py/repl.c
index 4cafb88e2..d804b9ff4 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;
-- 
GitLab