tpope/vim-markdown — Issue #11: Don't apply markdown highlighting in HTML contexts
Author: cespare
Created: 2011-12-07 01:37:09+00:00
State: open

Apologies for not including code; I took a stab at this but I couldn't figure out how to do it.

Basically, inside HTML tags, we should not apply markdown highlighting. Markdown engines shouldn't be applying any markdown formatting inside those tags. From the [Markdown syntax docs](http://daringfireball.net/projects/markdown/syntax):

> Note that Markdown formatting syntax is not processed within block-level HTML tags. E.g., you can’t use Markdown-style *emphasis* inside an HTML block.

I ran into this when using some `_` characters inside tables for a Github readme and had all the following text highlighted as if italic. (Github's markdown doesn't include table syntax, which is common in many markdown extensions, so I was using an inline `

` element.)