This project is an Asciidoctor extension for highlighting source listing blocks using Rouge – a pure-ruby code highlighter that is compatible with pygments.

It supports all Asciidoctor features such as callouts, highlighting of specified lines (attribute highlight), passthroughs inside a code and all other substitutions.

This extension is highly customizable and modular.

Installation

To install (or update to the latest version):

gem install {gem-name}

or to install the latest development version:

gem install {gem-name} --pre

Usage

Set attribute source-highlighter to rouge; globally or in the document.

asciidoctor -r {gem-name} -a source-highlighter=rouge Example.adoc

License

This project is licensed under MIT License. For the full text of the license, see the LICENSE file.