Is there a package that styles html content inside of .md (markdown) files?
Doesn’t normal GFM syntax work there?
It works for me for both markdown editing and preview.
Syntax highlight on Markdown Preview not working
@heikki I am referring to inline html:
<p>TEST AWESOME</p> <p>TEST AWESOME</p> <p>TEST GREAT</p>
The standard markdown works.
I used to see the tag color coded in ST2/ST3.
This is how it looks to me:
Maybe you are not specifying the syntax there? Sublime doesn’t seem to need it.
@chrishough I have the same issue. It seems the markdown syntax highlighting is a bit finicky.
This will not be syntax highlighted as a title
I’ll do some more investigating.
Thanks you so much for looking into this. I appreciate it.
I too am looking for this. Not highlighting of a code block like @heikki shows but for actual html as part of the text flow in the markdown.
I have cases like this where I clearly want to see the
<div class="clearfix"></div> and other such html.
Well, it works if you put it inside code blocks, but I understand that’s not ideal for you:
A solution would be to extend the html syntax so that everything that wasn’t matched by the html rules gets treated as gfm markdown (included text nodes if the grammar recognize them)
I think he wants an actual clearfix div in the output of the markdown converter, not a visualization of the source code for a clearfix div.
This is what it looks like in Brackets (the editor). I am not trying to make a request or such. Just testing Atom as a possible replacement of Sublime and want to make sure I am not skipping it cause I missed some features that are present if only I turned it on or install the correct plugin(s).
Yea so that looks like what a grammar would usually do, i.e. in this case the Github Flavored Markdown language.
I’d open an issue on the relevant repo for this. I certainly agree this should be implemented.
I have the same problem here. I see no syntax highlighting in a md file while using Github Markdown (which I assume is the same as GFM)
GFM == GitHub Flavored Markdown == GitHub Markdown
Have you followed the suggestions in the Debugging document? Also, could you give the following information?
- Which version of Atom are you using?
- What OS and version are you running?
- Can you reproduce the issue after completely exiting Atom and restarting using
- What syntax theme are you using?
- Exactly what text do you have in the Markdown file that is not colored? And what do you expect it to be colored like?
Which version of Atom are you using?
What OS and version are you running?
Can you reproduce the issue after completely exiting Atom and restarting using atom --safe?
The issue remains
What syntax theme are you using?
Monokai/Atom Dark produce the same result
Exactly what text do you have in the Markdown file that is not colored? And what do you expect it to be colored like?
That’s a good question. My comment is based on what I see in sublime. For example:
In atom (…to continue)
As you can see, the div/iframe tags are colored in sublime but they look like plane text in atom. In addition (aside comment), I don’t know how to make a long string to continue in the next line.
I opened an issue on the language-gfm package for this:
The reason why I asked what you expected @rvalenzuelar, is because you said:
I see no syntax highlighting in a md file
So I wanted to make sure if you were having the same issue of HTML sections not being highlighted, which is expected because the syntax definition doesn’t support that, or if you were seeing no highlighting at all which would have been a completely different issue
You are right @leedohm, the problem is the embedded html. Thanks for taking care of this, I’d really like to keep using Atom but so far this is a limitation. I’ll look forward for a solution.
See the settings page, scroll to the bottom and see “soft wrap”.