fix multi-line string with single quotes problem PY-12223
authorAmarchuk <aamarchuk@gmail.com>
Tue, 25 Feb 2014 16:25:41 +0000 (20:25 +0400)
committerAmarchuk <aamarchuk@gmail.com>
Tue, 25 Feb 2014 16:25:41 +0000 (20:25 +0400)
python/src/com/jetbrains/python/console/PydevConsoleExecuteActionHandler.java

index 809d957b7be1767db979f36ef916e256a4cd6202..912b6e06147d7ff5a7bd2065e5ac4a707c4c8ff6 100644 (file)
@@ -137,13 +137,12 @@ public class PydevConsoleExecuteActionHandler extends ConsoleExecuteActionHandle
 
     // multiline strings handling
     if (myInMultilineStringState != null) {
-      if (PyConsoleUtil.isDoubleQuoteMultilineStarts(line)) {
+      if (PyConsoleUtil.isDoubleQuoteMultilineStarts(line) || PyConsoleUtil.isSingleQuoteMultilineStarts(line)) {
         myInMultilineStringState = null;
         // restore language
         console.setLanguage(PythonLanguage.getInstance());
         console.setPrompt(PyConsoleUtil.ORDINARY_PROMPT);
-      }
-      else {
+      } else {
         return;
       }
     }