sublime-markdown-extended icon indicating copy to clipboard operation
sublime-markdown-extended copied to clipboard

HTML and fenced blocks conflict

Open Suor opened this issue 10 years ago • 12 comments

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.

Suor avatar Apr 09 '15 02:04 Suor

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>

jonschlinkert avatar Apr 09 '15 06:04 jonschlinkert

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

Suor avatar Apr 09 '15 08:04 Suor

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

jonschlinkert avatar Apr 09 '15 13:04 jonschlinkert

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

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

And they are not highlighted.

Suor avatar Apr 09 '15 14:04 Suor

This is outside table. Links in table are highlighted.

Suor avatar Apr 09 '15 14:04 Suor

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

Suor avatar Apr 09 '15 14:04 Suor

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

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

jonschlinkert avatar Apr 10 '15 03:04 jonschlinkert

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

Suor avatar Apr 10 '15 04:04 Suor

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

jonschlinkert avatar Apr 10 '15 05:04 jonschlinkert

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 avatar Apr 10 '15 05:04 Suor

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.

Suor avatar Apr 10 '15 05:04 Suor

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

jonschlinkert avatar Apr 10 '15 14:04 jonschlinkert