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

rouge support? #141

Closed
jneen opened this issue Jul 13, 2014 · 8 comments
Closed

rouge support? #141

jneen opened this issue Jul 13, 2014 · 8 comments
Assignees
Labels

Comments

@jneen
Copy link

@jneen jneen commented Jul 13, 2014

Hey there, there was a discussion about ways to add an option to use rouge instead of coderay, and it seems to have trailed off. ( #68 (comment) ). For my own personal use, I can just write a little bit of glue code myself that overrides the highlighting behavior, but it seems some people want a more packaged solution. ( rouge-ruby/rouge#118 ). What's the best integration point here?

@gettalong
Copy link
Owner

@gettalong gettalong commented Oct 23, 2014

@jneen I have updated the code to allow pluggable syntax highlighters (See 49e1b12). The coderay specific stuff has be moved in such a syntax highlighter implementation and I will add a rouge implementation the coming days before the next release.

Just a quick question: Syntax highlighting inline code with rouge is done by using wrap: false, is this correct? I have looked at the rouge plugin for redcarpet and modeled the kramdown implementation on it but that implementation doesn't discriminate between block and span code.

@jneen
Copy link
Author

@jneen jneen commented Oct 23, 2014

Awesome, thanks!

Ah yes, iirc the redcarpet plugin doesn't get called for span code, so it's just unhighlighted. For span code I'd use wrap: false and manually wrap with whatever span you like.

@gettalong
Copy link
Owner

@gettalong gettalong commented Oct 23, 2014

Perfect, thanks for the fast answer!

@gettalong
Copy link
Owner

@gettalong gettalong commented Oct 23, 2014

@jneen Rouge support has been added with commit 199e5ec - it's more or less a straight port from the redcarpet plugin. However, since I'm not that familiar with Rouge it would be great if you could have a look at the implementation (see https://github.com/gettalong/kramdown/blob/199e5ecf256497add54e6a097796d64cf0925b00/lib/kramdown/converter/syntax_highlighter/rouge.rb) - thanks!

@gettalong
Copy link
Owner

@gettalong gettalong commented Oct 24, 2014

@jneen Thanks for your comments! The next version will ship next week with these changes.

@gettalong gettalong closed this Oct 24, 2014
@jneen
Copy link
Author

@jneen jneen commented Oct 24, 2014

Thanks for your work! I look forward to it. Let me know when that goes out, I'll get back to some people about it.

@ghost
Copy link

@ghost ghost commented Oct 24, 2014

👏

@gettalong
Copy link
Owner

@gettalong gettalong commented Oct 25, 2014

@jneen I have just released version 1.5.0 with rouge support - also see https://twitter.com/_gettalong/status/526122568181628928

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

Successfully merging a pull request may close this issue.

None yet
2 participants