Skip to content

Commit 723523a

Browse files
committed
fix(syntaxes): python multiline f strings support
Fix #69
1 parent bdbc72c commit 723523a

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

syntaxes/highlight-sql-string.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@
109109
]
110110
},
111111
{
112-
"begin": "(\"\"\")(--\\s*sql)",
112+
"comment": "Python multi-line strings",
113+
"begin": "f?(\"\"\")(--\\s*sql)",
113114
"beginCaptures": {
114115
"2": {
115116
"name": "comment.sql"

test/testdata/multiline.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,8 @@
99
query_with_db_identifiers = """--sql
1010
delete * from "book";
1111
"""
12+
13+
some_table = "book"
14+
f_string = f"""--sql
15+
select * from {some_table}
16+
"""

0 commit comments

Comments
 (0)