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
Add syntax highlighting for asciidoc #280
Comments
Is there a specific version of asciidoc that we need to support this? |
It appears the pygments filter was added in 8.6.0 according to the changelog. http://www.methods.co.nz/asciidoc/CHANGELOG.html#_version_8_6_0_2010_08_16 The source highlight block itself seems to have been added in 7.0.3, but at that time only used gnu source-highlight. The pygments filter, IMO, is far more flexible. I personally use asciidoc 8.6.6 (meaning the version I'm most familiar with). |
Yup, it looks like we run 8.4 in production but everything passes locally on 8.6.7. I'll see about getting production updated. |
Awesome! |
Would this fix all asciidoc files in github repo's, or just in the wiki's? We're running into this problem too, and it would be awesome it if was fixed. Our options are leave it as is
or remove the [source,foo]
|
Upgrading asciidoc should fix it everywhere as both Gollum and the regular repo rendering rely on github/markup. |
Excellent! Any estimated timeframe for this? I'm not rushing, just want to decide on which option to go with from my post above :-) |
hmmm am I guessing right that this doesn't work for anyone yet ? I have just looked at this issue briefly and there are 2 things that needs to be done.
asciidoc -s --backend=xhtml11 -o - - This needs to be changed because we need to add this line to asciidoc config source-highlighter=pygments
|
please see github/markup#145 You can use my fork of markup it works there with gollum, until they merge it to main repo. |
Sorry for the wait everyone. Asciidoc syntax highlighting (through the default highlighter Rouge, or Pygments if it is installed) is implemented in this PR, which will be part of the next minor release of gollum-lib. Note that this is only in the open source gollum app (which has diverged from github.com). |
Now implemented as part of gollum-lib |
Is this an accurate statement?
This might be a source of confusion to some people. If so, it might make sense to add this to gollum-lib's documentation (I'm happy to help with that). |
That would appear to be accurate. :) Gollum does its own syntax highlighting (through Rouge or Pygments), superceding the behavior of the underlying markup renderer. So asciidoc syntax blocks will still be rendered by Rouge by default, courtesy of gollum-lib. That also means you can use github-style codeblocks no matter what markup/renderer you are using. If that's unclear in the readme or wiki, please point it out to us (or open a pull request/edit it yourself)! |
Add syntax highlighting to [source] blocks using the pygments syntax highlighting engine.
In order to support this, the [source] blocks need to be honored. Currently, this markup breaks the rendering:
The text was updated successfully, but these errors were encountered: