Skip to content

Fix fenced code block syntax highlighting#534

Merged
alerque merged 3 commits into
preservim:masterfrom
ANK-dev:fenced_code_block
Apr 26, 2022
Merged

Fix fenced code block syntax highlighting#534
alerque merged 3 commits into
preservim:masterfrom
ANK-dev:fenced_code_block

Conversation

@ANK-dev

@ANK-dev ANK-dev commented Dec 20, 2020

Copy link
Copy Markdown
Contributor
  • added support for tilde ~ fenced code blocks
  • added support for arbitrary length code block fences

* added support for tilde `~` fenced code blocks
* added support for arbitraty length code block fences
@ANK-dev

ANK-dev commented Dec 20, 2020

Copy link
Copy Markdown
Contributor Author

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.

@alerque alerque left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I preliminary review of this looks solid to me. Would you by chance be around to either rebase on master or merge from master and resolve the merge conflicts?

@ANK-dev

ANK-dev commented Apr 25, 2022

Copy link
Copy Markdown
Contributor Author

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

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

Fix the following error: Use robust operators `!~#` or `!~?` instead of `!~`
@alerque

alerque commented Apr 26, 2022

Copy link
Copy Markdown
Member

Thanks for the contribution!

@alerque alerque merged commit 9068655 into preservim:master Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants