Skip to content

Support for template strings in JSX expressions in MDX? #44

@karlhorky

Description

@karlhorky

Potentially similar to #37

It would be great to be able to use language identifier comments inside of curly brace JSX expressions inside of MDX:

{/* css */`
  em { color: red }
`}

On the MDX side (left side):

  1. The first CSS code inside of the code block is syntax highlighted
  2. The subsequent CSS code in the tagged template strings are not syntax highlighted

Screenshot 2024-12-08 at 12 11 41

Originally I reported this to the MDX VS Code extension:

But it appears that this is not work to be done on their side, but rather on the side of extensions which add the syntax highlighting to commented and tagged template strings, including this extension and also others:

What would be involved in implementing this in the Comment Tagged Templates VS Code extension?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions