Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL code highlighting is broken #451

Open
mtoy-googly-moogly opened this issue Mar 26, 2024 · 1 comment
Open

SQL code highlighting is broken #451

mtoy-googly-moogly opened this issue Mar 26, 2024 · 1 comment

Comments

@mtoy-googly-moogly
Copy link
Contributor

Once upon a time, I think, we highlighted SQL Inside of Malloy properly. Something like:

source: MOCK_DATES is duckdb.sql(
"""SELECT
  ts::DATE as MOCK_DATE_COLUMN
  FROM generate_series(
    TIMESTAMP '2000-01-01',
    TIMESTAMP '2030-01-01',
    INTERVAL '1' DAY) AS t(ts)
""")

There are two problems.

  1. Someone (I suspect me) broke this.
  2. There was no test to stop me from breaking this.
@whscullin
Copy link
Contributor

It's a little finicky -

source: MOCK_DATES is duckdb.sql("""
SELECT
  ts::DATE as MOCK_DATE_COLUMN
  FROM generate_series(
    TIMESTAMP '2000-01-01',
    TIMESTAMP '2030-01-01',
    INTERVAL '1' DAY) AS t(ts)
""")

works. So we're just missing a like \s* somewhere

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants