demon386/SmartMarkdown

indentify headlines wrongly between ```

yanping opened this issue · 5 comments

when some codes between ``` contains # or ##, SmartMarkdown take the lines as headlines, but they can be comments, for example , in R. As following:

Imgur

It's purview of Markdown plugin (shipped with ST by default).
There is no such thing as fenced code in Markdown, if you know what I mean.

As workaround you can use another tmLanguage for Markdown instead of default one, e.g. this one.
Mind you, default one should be overwrited if you want it to work right away, otherwise you'll need to set syntax in ST from Markdown to Markdown (yea, it's confuse, I know).

@vovkkk Thank you very much

Or you can just put a space before your comments - still works as a comment in R at least, and then doesn't get treated as a heading by smartmarkdown

Well, sure, whitespace is an option, but how about syntax highlighting?

2014-10-31 02-07-55 untitled - sublime text 2

it is knockdown plugin, fwiw; I think it doesn’t support R, would be relatively easy to add it though.

Thanks for these ideas. I will get back to work on those issues next week.