Skip to content

Lang: tsx-tags? #188

Description

@karlhorky

Hi, first of all thanks so much for this project and the other Shiki packages! They are very useful for so many projects.

Sometimes it's useful to have both TSX and also common tagged template literals, currently only offered in the "TypeScript with Tags" language.

Motivating example (async React Server Component with sql tagged template literal):

async function Blog() {
  const posts = await sql`
    SELECT
      *
    FROM
      posts
  `;

  return (
    <ul>
      {posts.map((post) => (
        <li>{post.title}</li>
      ))}
    </ul>
  )
}

Alternatives considered

Or maybe it makes sense to:

  1. Always support tags in the TypeScript and TSX langs
  2. Remove the separate "TypeScript with Tags" lang

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions