python: Improve handling of triple-quoted strings (#20664)
Closes #13998 /cc @notpeter would you mind giving this branch a go to see if this is pleasant to use? This impl is not quite what VSC has, but I think it feels okay? In this PR, the sequence goes as follows: 1st keypress: "|" 2nd keypress: ""| 3rd keypress: """|""" Release Notes: - Improved handling of triple-quote strings in Python.
This commit is contained in:
parent
a650fe0d77
commit
49eb865e8a
1 changed files with 2 additions and 0 deletions
|
@ -5,6 +5,8 @@ first_line_pattern = '^#!.*\bpython[0-9.]*\b'
|
|||
line_comments = ["# "]
|
||||
autoclose_before = ";:.,=}])>"
|
||||
brackets = [
|
||||
{ start = "\"\"\"", end = "\"\"\"", close = true, newline = false, not_in = ["string"] },
|
||||
{ start = "'''", end = "'''", close = true, newline = false, not_in = ["string"] },
|
||||
{ start = "{", end = "}", close = true, newline = true },
|
||||
{ start = "[", end = "]", close = true, newline = true },
|
||||
{ start = "(", end = ")", close = true, newline = true },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue