jonschlinkert / sublime-markdown-extended

Top 100 Sublime Text plugin! Markdown syntax highlighter for Sublime Text, with extended support for GFM fenced code blocks, with language-specific syntax highlighting. YAML Front Matter. Works with ST2/ST3. Goes great with Assemble.
https://github.com/jonschlinkert
MIT License
660 stars 96 forks source link

Unpaired Backticks (`) break syntax highlighting. #133

Closed bcj closed 7 years ago

bcj commented 8 years ago

Unpaired backticks (```) in a code block causes highlighting to break until an additional triple backtick is encountered.

This issue body will demonstrate the behavior when the raw text is copied into sublime.

Paired backticks:

> echo '`works`'
`works`

Unpaired backticks:

> echo '`'
`

This text is still being sh syntax highlighted. So is this python code:

> print('still sh')
still sh

To escape sh, an additional triple backtick is required:


_This_ text is markdown syntax highlighted.

```python
> print('python syntax')
python syntax

Here is a copyable version of that body:

Paired backticks:

```sh
> echo '`works`'
`works`

Unpaired backticks:

> echo '`'
`

This text is still being sh syntax highlighted. So is this python code:

> print('still sh')
still sh

To escape sh, an additional triple backtick is required:


_This_ text is markdown syntax highlighted.

```python
> print('python syntax')
python syntax
jonschlinkert commented 8 years ago

Is that related to this library or sublime text?

bcj commented 8 years ago

This is specific to this library. Sublime's built-in Markdown syntax highlighting will render this example correctly (albeit, without syntax highlighting for code blocks)

jonschlinkert commented 7 years ago

punting to https://github.com/jonschlinkert/sublime-markdown-extended/issues/142