QScintilla/Lexers/LexerPython.py

changeset 6247
5c677a7f7d51
parent 6105
cbd34d558bd9
child 6645
ad476851d7e0
diff -r fe07a9f16f23 -r 5c677a7f7d51 QScintilla/Lexers/LexerPython.py
--- a/QScintilla/Lexers/LexerPython.py	Fri Apr 13 22:32:32 2018 +0200
+++ b/QScintilla/Lexers/LexerPython.py	Sat Apr 14 15:08:24 2018 +0200
@@ -88,7 +88,7 @@
         lead_spaces = editor.indentation(line)
         
         pline = line - 1
-        while pline >= 0 and re.match('^\s*(#.*)?$', editor.text(pline)):
+        while pline >= 0 and re.match(r'^\s*(#.*)?$', editor.text(pline)):
             pline -= 1
         
         if pline < 0:
@@ -96,13 +96,13 @@
         else:
             previous_lead_spaces = editor.indentation(pline)
             # trailing spaces
-            m = re.search(':\s*(#.*)?$', editor.text(pline))
+            m = re.search(r':\s*(#.*)?$', editor.text(pline))
             last = previous_lead_spaces
             if m:
                 last += indent_width
             else:
                 # special cases, like pass (unindent) or return (also unindent)
-                m = re.search('(pass\s*(#.*)?$)|(^[^#]return)',
+                m = re.search(r'(pass\s*(#.*)?$)|(^[^#]return)',
                               editor.text(pline))
                 if m:
                     last -= indent_width

eric ide

mercurial