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
659 stars 96 forks source link

HTML and fenced blocks conflict #81

Open Suor opened 9 years ago

Suor commented 9 years ago

It seems you only get highlight for one of them. If you only use a couple of <img> and <a> then fenced blocks work, but html tags look like mere text. If you through in <table> like here then blocks stop working but table, images and links are highlighted.

jonschlinkert commented 9 years ago

Highlighting HTML inside markdown is a little tricky. Instead of doing this:

</tr></table>

try putting the closing tag on its own line, like:

</tr>
</table>
Suor commented 9 years ago

Yeah, that works. Links stopped to be highlighted though.

jonschlinkert commented 9 years ago

Links inside html? or all links? For me the markdown links all seem to be highlighted

Suor commented 9 years ago

I use links, which are really bookmarks not links, like this:

<a name="limit"></a>

And they are not highlighted.

Suor commented 9 years ago

This is outside table. Links in table are highlighted.

Suor commented 9 years ago

You can see full example here - https://github.com/Suor/point-free/blob/master/README.md

jonschlinkert commented 9 years ago

Everything looks completely highlighted for me, including anchors. Am I missing something?

screen shot 2015-04-09 at 11 56 07 pm

Suor commented 9 years ago

Are you using some custom theme? Cause this is how it looks like for me: markdown-extended-hl

jonschlinkert commented 9 years ago

I use sublime-monokai-extended. It looks like your theme doesn't support the same level of styling.

Suor commented 9 years ago

But this means Markdown Extended only works halfway for most themes. Isn't this wrong approach? Shouldn't syntax classify everything to predefined set?

Suor commented 9 years ago

And even with Monokai Extended bug persists I either get html highlighted or markdown:

markdown-extended-hl-html markdown-extended-hl-markdown

The only difference is whether </tr> and </table> are on the same line.

jonschlinkert commented 9 years ago

But this means Markdown Extended only works halfway for most themes

This is the first time I've seen this issue in two years, so maybe it just works halfway for your theme?

Isn't this wrong approach?

Maybe, I'm open to a pr