Skip to content

Code block headers containing ``` don't fontify correctly #945

Description

@darkfeline

Markdown like this doesn't fontify correctly:

# blah

\``` shell foo bar "```" 
foo

\```

(backslashes for escaping)

To be fair, this syntax isn't formally specified in any markdown spec AFAIK, but gptel uses it for tools calls and I don't think it should be treated as an in-line code markup in any case?

Expected Behavior

Fontified as a code block

Actual Behavior

This gets treated as an in-line code markup:

\``` shell foo bar "```" 

(backslashes for escaping)

Steps to Reproduce

  1. Step A
  2. Step B
  3. Step C

Backtrace

Software Versions

  • Markdown Mode: markdown-mode, version 2.8-alpha
  • Emacs:
  • OS:

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