Skip to content

Snippets in JSX static site generators #453

@matkoch

Description

@matkoch

Is the feature request related to a problem

The default syntax of:

<!-- snippet: xyz -->

Won't work in JSX components. Instead it has to look something like this:

JetBrains Rider-nuke-web – 06-versioning mdx-2022-01-30-3Jlei0gl

Describe the solution

  • Markdown snippets would have to discover this new comment style {/* snippet: xyz */} in the place it should be included.
  • Additionally, it would have to:
    • Put {` at the start and `} at the end of the snippet and consider these the new code fences (instead of ```)
    • Escape empty lines with \n

Describe alternatives considered

The alternative is not to use markdown snippets.

Additional context

No additional context.

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