idea-markdown
idea-markdown copied to clipboard
Support GitHub GFM Syntax Highlighting
It would be great if you supported GitHub GFM syntax highlighting.
For example:
val foo = "bar"
<foo>bar</foo>
+1
+1
http://github.github.com/github-flavored-markdown/
I'm having issues with a bunch of Markdown files that are marked ```scala which makes previewing it tricky.
+1
Language injections in general would be very nice. Not just for the GFM, but also for PHP Markdown Extra style fenced code blocks and the variant supported by doxygen:
~~~{.php}
...php code here
~~~
+1 Its so cool to wirte md-files for github directly in the IDE
+1
+1
:+1:
+1
+1
+1
:+1:
So what is missing exactly ? This plugin already has support for these Github extensions (from Pegdown docs):
- HARDWRAPS: Alternative handling of newlines, see Github-flavoured-Markdown
- AUTOLINKS: Plain (undelimited) autolinks the way Github-flavoured-Markdown implements them.
- FENCED CODE BLOCKS: Fenced Code Blocks in the way of PHP Markdown Extra or Github-flavoured-Markdown.
You just have to enable it in the settings.
@nicoulaj On GitHub, if I wanna insert plain-text code, I can surround my code in three tick marks above and below it and the code will be printed as plain text. On your plugin, I enabled the fenced code blocks
feature, but I still can't do this for some reason.
(p.s. could you please add a keyboard shortcut to toggle preview/text? Thanks so much!!) :)
:+1:
:+1:
:+1:
Also task lists.
* [ ] foo
* [x] foo
is a checkbox
- [ ] foo
- [x] foo
:thumbsup:
I don't suppose it would be possible to get those checkmarks AND the default github stylesheet integrated? So markdown files look like they're styled to look how they look on github?
+1
+1
+1 !
@nicoulaj
and especially:
:+1:
:+1:
Just a thought, but GitHub does offer an API endpoint to render "GitHub flavored Markdown".
They also offer a Ruby Gem packaged for local reuse. This of course would require an embedded Ruby run-time - Koala, for example, has a minimal Ruby run-time embedded, which doesn't even bloat the distribution (much) and guarantees a safe, easy, direct upgrade-path to future versions of GitHub's Markdown.
I mean to suggest that there are much simpler/easier ways to get to full support for Markdown without relying on a third-party implementation. The number of users submitting +1's for GitHub Markdown suggest this may be what most users are longing for, although I suppose it's possible this project is aiming for broader/generic Markdown support? I don't know how you would address the potential number of proprietary Markdown extensions in practice though - might be better to just settle for one, the most popular one, if that's GitHub...
afaik http://commonmark.org/ offers a c implementaion, maybe also java.
On Mon, Nov 10, 2014 at 6:39 AM, Rasmus Schultz [email protected] wrote:
Just a thought, but GitHub does offer an API endpoint https://developer.github.com/v3/markdown/ to render "GitHub flavored Markdown".
They also offer a Ruby Gem https://rubygems.org/gems/github-markdown packaged for local reuse. This of course would require an embedded Ruby run-time - Koala http://koala-app.com/, for example, has a minimal Ruby run-time embedded, which doesn't even bloat the distribution (much) and guarantees a safe, easy, direct upgrade-path to future versions of GitHub's Markdown.
I mean to suggest that there are much simpler/easier ways to get to full support for Markdown without relying on a third-party implementation. The number of users submitting +1's for GitHub Markdown suggest this may be what most users are longing for, although I suppose it's possible this project is aiming for broader/generic Markdown support? I don't know how you would address the potential number of proprietary Markdown extensions in practice though - might be better to just settle for one, the most popular one, if that's GitHub...
— Reply to this email directly or view it on GitHub https://github.com/nicoulaj/idea-markdown/issues/34#issuecomment-62392349 .
afaik http://commonmark.org/ offers a c implementaion, maybe also java.
Again, you will be relying on a third party to keep up with any changes made to the official GitHub implementation, as well as (obviously) getting it right in the first place.
I guess the most straightforward solution is to use the gem + jruby, but not sure it works, looks like this gem is not pure ruby: see github/markup#232
looks like this gem is not pure ruby
Yeah, looks like the Ruby part is just a thin interface to a C library. That's probably a terrible idea then. Unless maybe it's possible to build the C library using Emscripten? Of course porting it would take some footwork.
Another thought is to let the browser do the work, e.g. using a JS library like marked which seems to have good support for GitHub flavor already.
+1 for full GitHub flavored Markdown rendering, complete with correct styles.
And backticked blocks like this do not work reliably
or honor newlines inside of them
like this
Hi @nicoulaj I would be up for looking into this if you could give me some guidance on the code.
Even if you do not want to give up your own parser/renderer, and compatibility with other Markdown flavors, a 'GitHub option' would be quite useful. This option would simply override all other options and render as close as possible to GitHub flavored Markdown.
FYI: Here you can find an up-to-date css file you can use:
https://github.com/sindresorhus/github-markdown-css
Pretty nifty. It is automatically generated from GitHub itself.
+1
Tables also do not render as tables, no matter what is checked in the settings
Notice: This plugin is no more maintained and it has been removed from Jetbrains plugins repository. There is a Markdown plugin officially supported by Jetbrains.