Skip to content

Choice of language class for fenced code blocks with the highlightjs-lang extension #370

@dkasak

Description

@dkasak

Currently, if the highlightjs-lang extension is enabled, the language of the fenced code block will be added as a HTML class to the code element. E.g. for Python code blocks, a python class will be added to the block.

However, a more common and interoperable technique is to prepend the language name with language-, e.g. language-python. This is mentioned in the WHATWG HTML standard and is expected by a variety of other tools and clients (an example being the Element Matrix client). I personally encountered this issue while trying to use urlwatch (which depends on python-markdown2) to send Markdown reports to Matrix.

Would you consider changing this or adding a configuration option for it?

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