inline_sql_syntax icon indicating copy to clipboard operation
inline_sql_syntax copied to clipboard

Syntax highliting for individual queries in multiline strings (abstracted from language-specific strings)

Open barklan opened this issue 3 years ago • 0 comments

Example:

query = """
    SELECT * FROM book;
    SELECT id FROM user;
"""

Two queries should be highlighted separately (starting token is SELECT , ending is semicolon (;).

The thing I'm worried about here is false positives like this one:

query = """
    THIS IS SOME CAPS TEXT. WHO KNOWS WHY IT'S CAPS, but the next line is highlighted as SQL.
    SELECT COMMITTEE .. SOME GIBBERISH FROM SOMETHING. 
"""

barklan avatar Jun 23 '22 15:06 barklan