Skip to content

Commit b775e19

Browse files
authored
fix: support python double quote regexp (#258)
This pull request add double quote regex support in python, like `r".*"`.
1 parent 20bea25 commit b775e19

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

autocorrect/grammar/python.pest

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@ inner_string = _{
2121
regexp = ${
2222
("r'" ~ (!(NEWLINE | "'") ~ ANY)* ~ "'")
2323
| ("r\"\"\"" ~ (!("\"\"\"") ~ ANY)* ~ "\"\"\"")
24+
| ("r\"" ~ (!(NEWLINE | "\"") ~ ANY)* ~ "\"")
2425
| ("compile(" ~ " "* ~ inner_string ~ (!")" ~ ANY)* ~ ")")
2526
}

0 commit comments

Comments
 (0)