Skip to content

bug: newline literal in SQL in Typescript template string breaks parsing #334

@johtso

Description

@johtso

Did you check existing issues?

  • I have read all the tree-sitter docs if it relates to using the parser
  • I have searched the existing issues of tree-sitter-typescript

Tree-Sitter CLI Version, if relevant (output of tree-sitter --version)

No response

Describe the bug

Image

const query = sql`
    SELECT
        string_agg(DISTINCT foo.eventname, E'\n') AS performance_names,
        foo.fullname AS customer_name
      FROM
        foo
      ORDER BY
          ctd.order_id
`

Steps To Reproduce/Bad Parse Tree

try to highlight

const query = sql`
    SELECT
        string_agg(DISTINCT foo.eventname, E'\n') AS performance_names,
        foo.fullname AS customer_name
      FROM
        foo
      ORDER BY
          ctd.order_id
`

Expected Behavior/Parse Tree

SQL should be correctly highlighted

Repro

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions