Skip to content

Highlight tokens in syntax highlighted code #142

@dtuite

Description

@dtuite

In documentation, we often want to display a code snippet for the user to copy paste but we need them to replace certain tokens in the snippet with their own information in order for it to work correctly. An example might be their GitHub Org name, their email address or their Roadie subdomain.

It would be nice if we could highlight these tokens so they stand out when the code is syntax highlighted.

For an example of us struggling with this problem, see this comment: #137 (comment)

This functionality may give us what we need: https://prismjs.com/plugins/highlight-keywords/

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions