Skip to content

Support space as seperator between language and additional class in code block #1384

Closed
@tuyen-at-work

Description

@tuyen-at-work

Use case

Let say I want to add h500 as a class for a code block.

Editor

In VS Code, we can use space between language and additional class without loose syntax highlighting:

image

But if I use comma instead of space between language and additional class, the highlighting doesn't work:

image

Render

Let check what happen when two above code blocks got rendered:

The first case loose syntax highlighting:

image

The second case work nicely:

image

Current status

In current situation, if I want to use additional class, I have to choose:

  • Either have syntax highlighting in VS Code, and loose it when rendered, or
  • Don't have syntax highlighting in VS Code, and get it when rendered

Feature request

Please support space as seperator between language and additional class in code block, so we can have syntax highlighting for both editor and rendered version.

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