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

Asciidoctor: add pygments.rb (highlighter) to Gemfile #22474

Merged
merged 1 commit into from
Feb 10, 2017
Merged

Asciidoctor: add pygments.rb (highlighter) to Gemfile #22474

merged 1 commit into from
Feb 10, 2017

Conversation

PierreR
Copy link
Contributor

@PierreR PierreR commented Feb 5, 2017

Motivation for this change

I use pygments.rb to highlight haskell code in adoc file. Maintaining local gem files just to get that feature is a bit of a pain.

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@mention-bot
Copy link

@PierreR, thanks for your PR! By analyzing the history of the files in this pull request, we identified @gpyh and @k0ral to be potential reviewers.

@PierreR
Copy link
Contributor Author

PierreR commented Feb 9, 2017

@zimbatm would you mind reviewing this PR ?

@zimbatm
Copy link
Member

zimbatm commented Feb 9, 2017

Sure. Can you add me a sample where pygments.rb is being used? If I remember correctly there are multiple highlighting options available, is pygments.rb the best one?

@PierreR
Copy link
Contributor Author

PierreR commented Feb 9, 2017

@zimbatm indeed there are a couple of source highlighter for asciidoctor:

  • highlightjs: builtin (don't require any extra gem) but won't render in pdf
  • coderay: requires a separate gem, less languages supported
  • pygments : requires a separate gem, many languages supported
  • prettify: don't know much about it but it didn't match my requirements at the time. I am not sure it is still active.

My personal requirement is to have haskell supported in html and pdf. AFAIK only pygments can do that.

As a extra note, the PR just add pygments as a possible choice. You can still use hightlightjs if you wish so.

We can either include all possible highlighters or wait for a request before doing so.

@zimbatm zimbatm merged commit 0010516 into NixOS:master Feb 10, 2017
@zimbatm
Copy link
Member

zimbatm commented Feb 10, 2017

Thanks. Let's go with the batteries included route.

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

Successfully merging this pull request may close these issues.

3 participants