Sha256: 0dbcf5c9b31fcdb442c9fe8c871c41bd2db3acea860051e957eaa2b531021035

Contents?: true

Size: 798 Bytes

Versions: 10

Compression:

Stored size: 798 Bytes

Contents

// .source-coderay
// Demonstration of source highlighting with coderay
// :include: //div[@class="slides"]
// :header_footer:
= Source Code with Coderay
:icons: font
:source-highlighter: coderay
:coderay-css: style

== Requirements

WARNING: This will not work from Asciidoctor.js

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

    gem 'coderay'

to your `Gemfile` and re-run:

    bundle install
====

== Use the Source

[source, ruby]
----
# My first Ruby program
# On my way to Ruby fame & fortune!

puts 'Hello, world!'
----

== Highlight Lines

// TODO linenums CSS negatively affects the output
// TODO highlighting is invisible

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
asciidoctor-revealjs-5.1.0 examples/source-coderay.adoc
asciidoctor-revealjs-5.0.1 examples/source-coderay.adoc
asciidoctor-revealjs-5.0.0.rc1 examples/source-coderay.adoc
asciidoctor-revealjs-4.1.0 examples/source-coderay.adoc
asciidoctor-revealjs-4.1.0.rc5 examples/source-coderay.adoc
asciidoctor-revealjs-4.1.0.rc4 examples/source-coderay.adoc
asciidoctor-revealjs-4.1.0.rc3 examples/source-coderay.adoc
asciidoctor-revealjs-4.1.0.rc2 examples/source-coderay.adoc
asciidoctor-revealjs-4.0.1 examples/source-coderay.adoc
asciidoctor-revealjs-4.0.0 examples/source-coderay.adoc