Closed vmuriart closed 8 years ago
It's actually not that trivial due to how newlines affect the general tokenizing procedure, but still possible.
Forgot to actually include the tip:
By pushing a different context that checks for the first non-whitespace character and if that marks the beginning of an SQL statement or query, you would set the SQL context, otherwise set the usual string context.
This should be resolved by 8e8831f13ba46f1a30a99d1114b8148e6a481a82
@wbond Thank you very much! just tested it, and it works! Though it seems to have introduced a small bug.
sql = """
select colA
from tabs
"""
The opening """
isn't being colored and is left colored white. The closing one is still being colored correctly.
I haven't been able to figure this one out even though I know its a simple regex edit. In the Python syntax definition to support embedded sql, I want to add an optional line break after the triple quotes to allow this to work
currently only this one gets highlighted