preservim / vim-markdown

Markdown Vim Mode
4.69k stars 524 forks source link

Fix fenced code block syntax highlighting #534

Closed ANK-dev closed 2 years ago

ANK-dev commented 3 years ago
ANK-dev commented 3 years ago

As per CommomMark Spec, fenced code blocks can be written using either 3 or more ` or 3 or more ~. Although the plugin successfully recognized backtick and tilde fenced code blocks, it only applied syntax highlighting for backtick fenced code blocks.

This pull request fixes this behavior, and also allows the code block fences themselves to be of an arbitrary length while maintaining syntax highlighting.

ANK-dev commented 2 years ago

Just merged it. Can you check if it's ok?

EDIT: Just fixed a vint workflow error that I didn't notice.

alerque commented 2 years ago

Thanks for the contribution!