Open frewsxcv opened 9 years ago
I like this idea. Markdown is quite common in comments, so highlighting comments (or maybe only doc comments?) would be nice.
Unfortunately, I'm quite busy with my main job at the moment and I don't get much time for Github. But feel free to submit a pull request ;)
I've tried to implement this but struggle with a few edge cases:
Markdown block elements don't work in line doc comments:
I guess this is because line comments are recognised individually
Stars in block doc comments:
It's probably obvious why this happens, but I really don't know how to prevent this.
With normal block comments every thing works as expected:
Every help is welcome!
I am trying to add a spell-checker for rust doc comment using the linter-spell package, and this would be needed to prevent spell checking of links, examples and other in documentation comments. I can not help here, as I do not know enough of javascript and atom internals. But I wanted to let you know that this would be really nice to have!
Is there a branch were this is being worked on?
Is there an update to this discussion?
Okay it's five years later and I completely forgot I opened this and opened an identical issue 🙃.
@MoritzKn I guess this is because line comments are recognised individually
Regarding the line comments issue, is it possible we could capture all the line comments as a single block, instead of capturing them individually? Could that get us closer?
It might be possible to utilize the markdown+atom plugin grammar into this rust+atom plugin.
A similar example to this would be CSS or JS syntax highlighting within HTML documents https://github.com/atom/language-html