Skip to content

Parsing and highlighting of fenced blocks #2994

Closed
@pjeby

Description

@pjeby

Description

There are two problems visible in this page's rendering on try.gitea.io:

  • First, gitea's markdown processor is not CommonMark compliant for parsing fenced code blocks. (Search for the line rendered as ```shell mdsh -- this syntax is CommonMark compliant and renders correctly on Github.)

  • Second, even if the fence line is changed to something blackfriday can handle (i.e. wrapping it in { }), gitea appears to look up the entire shell mdsh line as a language name, instead of processing only the first word, the way github does. (Github's behavior in this respect is not part of the CommonMark spec, but is a reasonable default behavior.)

Probably the parsing issue needs to be reported upstream at blackfriday, but since it may impact their API, I assume that input from the gitea side would be relevant to that issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/enhancementAn improvement of existing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions