Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GFM code with syntax highlighting #58

Closed
panzi opened this issue Jul 2, 2012 · 10 comments
Closed

GFM code with syntax highlighting #58

panzi opened this issue Jul 2, 2012 · 10 comments

Comments

@panzi
Copy link

panzi commented Jul 2, 2012

GitHub flavored markdown supports syntax highlighted code like this:

/* comment */
var s = "string", i = 123;
function foo () {
   for (var x in xs) {
      console.log(x, xs[x]);
   }
}

This is not supported by marked. It should either state this or (better) implement it.

@TooTallNate
Copy link

Synax highlighting is already supported. Take a look at the highlight option. It works great in conjunction with highlight.js.

@chjj
Copy link
Member

chjj commented Jul 2, 2012

What TooTallNate said. Marked will never include its own syntax highlighter, but there are interfaces for using a highlighter with marked. See the readme.

@chjj chjj closed this as completed Jul 2, 2012
@panzi
Copy link
Author

panzi commented Jul 2, 2012

Ok, but it does not support the syntax that triggers syntax highlighting:

```javascript
var x = "...";
```

javascript lands in the output. It would be ok for me if the language parameter would just be stripped. And the shell app marked has no --highlight option.

@ELLIOTTCABLE
Copy link

👍

5 similar comments
@jklontz
Copy link

jklontz commented Jul 17, 2014

+1

@ricardoquesada
Copy link

+1

@ghost
Copy link

ghost commented May 3, 2016

+1

@egordorichev
Copy link

+1

@ghost
Copy link

ghost commented May 26, 2017

+1

@ELLIOTTCABLE
Copy link

I clearly started this trend, so I'll contribute to stopping it:

GitHub now supports emoji-reactions to Issue comments, which has become the de-facto standard for “voting” on Issues. If you want to +1 this, I suggest you click the 👍-react on the OP; as this avoids sending an e-mail to everybody who's ever commented on this Issue (as this reply itself inevitably will! 😰)

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

No branches or pull requests

7 participants