Skip to content
This repository has been archived by the owner on Dec 20, 2017. It is now read-only.

Support GitHub GFM Syntax Highlighting #34

Open
taylorleese opened this issue Sep 21, 2011 · 37 comments
Open

Support GitHub GFM Syntax Highlighting #34

taylorleese opened this issue Sep 21, 2011 · 37 comments
Labels

Comments

@taylorleese
Copy link

It would be great if you supported GitHub GFM syntax highlighting.

For example:

val foo = "bar"
<foo>bar</foo>
@iron9light
Copy link

+1

@wsargent
Copy link

wsargent commented Jan 1, 2012

+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.

@nodirt
Copy link

nodirt commented Feb 19, 2012

+1

@tacovandenbroek
Copy link

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
~~~

@psi-4ward
Copy link

+1
Its so cool to wirte md-files for github directly in the IDE

@ipetropolsky
Copy link

+1

2 similar comments
@arikon
Copy link

arikon commented Jul 24, 2013

+1

@ElijahLynn
Copy link

👍

@marcoalbarelli
Copy link

+1

3 similar comments
@jasoet
Copy link

jasoet commented Oct 17, 2013

+1

@aurelijusrozenas
Copy link

+1

@carueda
Copy link

carueda commented Nov 25, 2013

👍

@nicoulaj
Copy link
Owner

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.

@msafi
Copy link

msafi commented Jan 17, 2014

@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!!) :)

@creynders
Copy link

👍

2 similar comments
@rayshan
Copy link

rayshan commented Mar 17, 2014

👍

@grosser
Copy link

grosser commented Apr 7, 2014

👍

@andrew-luhring
Copy link

Also task lists.
* [ ] foo
* [x] foo
is a checkbox

  • foo
  • foo

@jamarty
Copy link

jamarty commented Apr 29, 2014

👍

@andrew-luhring
Copy link

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?

@maxwellpeterson-wf
Copy link

+1

1 similar comment
@lihuazhang
Copy link

+1

@florrain
Copy link

+1 !

@andrew-luhring
Copy link

@mfn
Copy link

mfn commented Sep 26, 2014

👍

1 similar comment
@andrew-luhring
Copy link

👍

@mindplay-dk
Copy link

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...

@grosser
Copy link

grosser commented Nov 10, 2014

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
#34 (comment)
.

@mindplay-dk
Copy link

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.

@nicoulaj
Copy link
Owner

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

@mindplay-dk
Copy link

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.

@DavidBoike
Copy link

+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

@nchelluri
Copy link

Hi @nicoulaj I would be up for looking into this if you could give me some guidance on the code.

@mhelvens
Copy link

mhelvens commented Apr 9, 2015

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.

@mhelvens
Copy link

mhelvens commented Apr 9, 2015

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.

@Vampire
Copy link

Vampire commented Jun 12, 2015

+1

Tables also do not render as tables, no matter what is checked in the settings

@nicoulaj
Copy link
Owner

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests