Sha256: a785f93786af545bc7820e7048fb61f95c69ad90f913efc26fbb3f016f00cadd

Contents?: true

Size: 962 Bytes

Versions: 7

Compression:

Stored size: 962 Bytes

Contents

// .source-rouge
// Demonstration of source highlighting with Rouge
// :include: //div[@class="slides"]
// :header_footer:
= Source Code with Rouge
:icons: font
:source-highlighter: rouge
:rouge-style: monokai
:docinfo: private

== Requirements

WARNING: This will not work from Asciidoctor.js

[NOTE]
====
For this to work. You need to add:

    gem 'rouge'

to your `Gemfile` and re-run:

    bundle install
====

== Use the Source

[source, rust]
----
fn main() {
    println!("Hello World!");
}
----

== Stretch the Source

[source, rust, role="stretch"]
----
fn main() {
    println!("Hello stretched World!");
}
----

== Rouge Features

// TODO missing `hll` class from styles provided Asciidoctor for rouge
// TODO linenums feature affects listing size

This is broken see `TODO` in this source

[source,ruby,highlight=2..4]
----
ORDERED_LIST_KEYWORDS = {
  'loweralpha' => 'a',
  'lowerroman' => 'i',
  'upperalpha' => 'A',
  'upperroman' => 'I',
}
----

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
asciidoctor-revealjs-4.1.0 examples/source-rouge.adoc
asciidoctor-revealjs-4.1.0.rc5 examples/source-rouge.adoc
asciidoctor-revealjs-4.1.0.rc4 examples/source-rouge.adoc
asciidoctor-revealjs-4.1.0.rc3 examples/source-rouge.adoc
asciidoctor-revealjs-4.1.0.rc2 examples/source-rouge.adoc
asciidoctor-revealjs-4.0.1 examples/source-rouge.adoc
asciidoctor-revealjs-4.0.0 examples/source-rouge.adoc