Skip to content

Support highlighting codespan using highlight option + or support async function in Renderer #1780

@aminya

Description

@aminya

Describe the feature

  1. Currently, marked only allows specifying a highlight function for code blocks and not inline code (codespan).

  2. Using the custom Renderer is not possible because (new Renderer()).codespan does not accept async functions. Thus, there is no way to use an async highlighter for highlighting codespan unless an exoteric solution like deasync is used.

Why is this feature necessary?
To highlight inline code.

Describe alternatives you've considered
Using a Pandoc renderer. However, lang can be provided externally through other parts of the code, and so this is independent of supporting Pandoc syntax for giving the language through the markdown syntax.

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