summaryrefslogtreecommitdiff
path: root/docs/modules
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2023-05-28 23:52:09 -0600
committerDan Allen <dan.j.allen@gmail.com>2023-05-29 00:11:22 -0600
commit638f678cc2353e5a5c553d1bc600bbed5919a102 (patch)
tree7c7382e79aadc981948f0aba4bbc063afed45fe7 /docs/modules
parent377c7ba631433a33e9fc17f27ee3f76cf5c2a162 (diff)
remove explicit source style in docs when not needed
Diffstat (limited to 'docs/modules')
-rw-r--r--docs/modules/ROOT/pages/features.adoc2
-rw-r--r--docs/modules/ROOT/pages/index.adoc2
-rw-r--r--docs/modules/ROOT/pages/localization-support.adoc4
-rw-r--r--docs/modules/ROOT/pages/reference-safe-mode.adoc2
-rw-r--r--docs/modules/api/pages/convert-strings.adoc14
-rw-r--r--docs/modules/docbook-backend/pages/index.adoc4
-rw-r--r--docs/modules/extensions/pages/block-macro-processor.adoc6
-rw-r--r--docs/modules/extensions/pages/block-processor.adoc6
-rw-r--r--docs/modules/extensions/pages/compound-block-processor.adoc2
-rw-r--r--docs/modules/extensions/pages/docinfo-processor.adoc4
-rw-r--r--docs/modules/extensions/pages/include-processor.adoc6
-rw-r--r--docs/modules/extensions/pages/inline-macro-processor.adoc6
-rw-r--r--docs/modules/extensions/pages/postprocessor.adoc4
-rw-r--r--docs/modules/extensions/pages/preprocessor.adoc4
-rw-r--r--docs/modules/extensions/pages/register.adoc2
-rw-r--r--docs/modules/extensions/pages/tree-processor.adoc6
-rw-r--r--docs/modules/html-backend/pages/custom-stylesheet.adoc14
-rw-r--r--docs/modules/html-backend/pages/default-stylesheet.adoc6
-rw-r--r--docs/modules/html-backend/pages/favicon.adoc10
-rw-r--r--docs/modules/html-backend/pages/manage-images.adoc2
-rw-r--r--docs/modules/html-backend/pages/skip-front-matter.adoc2
-rw-r--r--docs/modules/html-backend/pages/stylesheet-modes.adoc6
-rw-r--r--docs/modules/install/pages/ruby-packaging.adoc2
-rw-r--r--docs/modules/migrate/pages/asciidoc-py.adoc6
-rw-r--r--docs/modules/migrate/pages/confluence-xhtml.adoc2
-rw-r--r--docs/modules/stem/pages/asciimath-gem.adoc4
-rw-r--r--docs/modules/stem/pages/mathematical.adoc2
-rw-r--r--docs/modules/stem/pages/mathjax.adoc2
-rw-r--r--docs/modules/syntax-highlighting/pages/coderay.adoc16
-rw-r--r--docs/modules/syntax-highlighting/pages/highlightjs.adoc4
-rw-r--r--docs/modules/syntax-highlighting/pages/index.adoc13
-rw-r--r--docs/modules/syntax-highlighting/pages/pygments.adoc6
-rw-r--r--docs/modules/syntax-highlighting/pages/rouge.adoc6
33 files changed, 93 insertions, 84 deletions
diff --git a/docs/modules/ROOT/pages/features.adoc b/docs/modules/ROOT/pages/features.adoc
index 9a5ac3f3..de9566e0 100644
--- a/docs/modules/ROOT/pages/features.adoc
+++ b/docs/modules/ROOT/pages/features.adoc
@@ -73,7 +73,7 @@ If you're writing technical documentation that presents snippets of source code
Syntax highlighting is the practice of colorizing (or otherwise emphasizing) keywords and syntax elements in a structured programming or configuration language.
Here's an example to give you an idea:
-[source,ruby]
+[,ruby]
----
phrase = "I love AsciiDoc"
puts phrase
diff --git a/docs/modules/ROOT/pages/index.adoc b/docs/modules/ROOT/pages/index.adoc
index 814beb96..6a837696 100644
--- a/docs/modules/ROOT/pages/index.adoc
+++ b/docs/modules/ROOT/pages/index.adoc
@@ -36,7 +36,7 @@ a|
$ asciidoctor document.adoc
a|
-[source,ruby]
+[,ruby]
----
require 'asciidoctor'
Asciidoctor.convert_file \
diff --git a/docs/modules/ROOT/pages/localization-support.adoc b/docs/modules/ROOT/pages/localization-support.adoc
index 1a4fcaae..08b41ccb 100644
--- a/docs/modules/ROOT/pages/localization-support.adoc
+++ b/docs/modules/ROOT/pages/localization-support.adoc
@@ -137,7 +137,7 @@ Specify `listing-caption` to turn on captions for listing blocks.
If you plan to support multiple languages, you'll want to define the attributes for each language inside a xref:asciidoc:directives:conditionals.adoc[conditional preprocessor directive].
For example:
-[source,asciidoc]
+[,asciidoc]
----
\ifeval::["{lang}" == "de"]
:caution-caption: Achtung
@@ -158,7 +158,7 @@ To use this file to translate the built-in labels according the value of the `la
. Put the file in the folder [.path]_locale_ relative to your document.
. Add the following line to the header of your AsciiDoc document:
+
-[source,asciidoc]
+[,asciidoc]
----
\include::locale/attributes.adoc[]
----
diff --git a/docs/modules/ROOT/pages/reference-safe-mode.adoc b/docs/modules/ROOT/pages/reference-safe-mode.adoc
index bc278ccd..bf645603 100644
--- a/docs/modules/ROOT/pages/reference-safe-mode.adoc
+++ b/docs/modules/ROOT/pages/reference-safe-mode.adoc
@@ -14,7 +14,7 @@ The xref:safe-modes.adoc[safe mode] can be referenced by one of the following do
The attributes in the next example define replacement text for features that are disabled in high security environments:
-[source,asciidoc]
+[,asciidoc]
----
\ifdef::safe-mode-secure[]
Link to chapters instead of including them.
diff --git a/docs/modules/api/pages/convert-strings.adoc b/docs/modules/api/pages/convert-strings.adoc
index c4ef8d3c..6213a649 100644
--- a/docs/modules/api/pages/convert-strings.adoc
+++ b/docs/modules/api/pages/convert-strings.adoc
@@ -8,7 +8,7 @@ A string is the bare AsciiDoc content (often the contents of a file).
To parse an AsciiDoc string into a document object model, use:
-[source,ruby]
+[,ruby]
----
doc = Asciidoctor.load '*This* is Asciidoctor.'
----
@@ -34,14 +34,14 @@ However, if you're only interested in converting the AsciiDoc source when using
To convert the AsciiDoc string directly to HTML, use:
-[source,ruby]
+[,ruby]
----
puts Asciidoctor.convert '*This* is Asciidoctor.'
----
Here's the output you will see:
-[source,html]
+[,html]
----
<div class="paragraph">
<p><strong>This</strong> is Asciidoctor.</p>
@@ -86,7 +86,7 @@ That template is responsible for providing the styles and library integrations n
You can still generate a standalone document when converting a string.
To convert from an AsciiDoc string to a standalone output document, you need to explicitly set the `:standalone` option to `true`.
-[source,ruby]
+[,ruby]
----
puts Asciidoctor.convert '*This* is Asciidoctor.', standalone: true
----
@@ -98,7 +98,7 @@ If you don't set the `:standalone` option to `true`, you only get the embedded d
When the input or output is a file, the `:standalone` option is enabled by default.
Thus, to instruct Asciidoctor to write standalone HTML to a file from an AsciiDoc string, the `:to_file` option is mandatory.
-[source,ruby]
+[,ruby]
----
Asciidoctor.convert '*This* is Asciidoctor.', to_file: 'out.html'
----
@@ -113,7 +113,7 @@ However, you can force it to be included without the header and footer by settin
If you only want the inline markup to be returned, set the `:doctype` option to `'inline'`:
-[source,ruby]
+[,ruby]
----
puts Asciidoctor.convert '*This* is Asciidoctor.', doctype: 'inline'
----
@@ -125,7 +125,7 @@ In this mode, Asciidoctor will only process the first block (e.g., paragraph) in
You can produce DocBook 5.0 by setting the `:backend` option to `'docbook'`.
Since embedded DocBook isn't that useful, we also enable the standalone document (i.e., header and footer) by setting the `:standalone` option to `true`.
-[source,ruby]
+[,ruby]
----
puts Asciidoctor.convert '*This* is Asciidoctor.', standalone: true, backend: 'docbook'
----
diff --git a/docs/modules/docbook-backend/pages/index.adoc b/docs/modules/docbook-backend/pages/index.adoc
index a1cf2d73..68b5b38c 100644
--- a/docs/modules/docbook-backend/pages/index.adoc
+++ b/docs/modules/docbook-backend/pages/index.adoc
@@ -37,7 +37,7 @@ include::html-backend:example$my-document.adoc[tags=title;body]
Here's a snippet of the XML generated by the DocBook converter.
.XML generated from AsciiDoc
-[source,xml]
+[,xml]
----
<?xml version="1.0" encoding="UTF-8"?>
<?asciidoc-toc?>
@@ -76,7 +76,7 @@ A summary of the differences are as follows:
If you're using the Asciidoctor API, you can generate a DocBook document directly from your application.
.Generate DocBook output from the API
-[source,ruby]
+[,ruby]
----
Asciidoctor.convert_file 'my-document.adoc', backend: 'docbook'
----
diff --git a/docs/modules/extensions/pages/block-macro-processor.adoc b/docs/modules/extensions/pages/block-macro-processor.adoc
index cf38ea98..af3e6ea4 100644
--- a/docs/modules/extensions/pages/block-macro-processor.adoc
+++ b/docs/modules/extensions/pages/block-macro-processor.adoc
@@ -6,7 +6,7 @@ Create a block macro named `gist` for embedding a gist.
== sample-with-gist-macro.adoc
-[source,asciidoc]
+[,asciidoc]
----
.My Gist
gist::123456[]
@@ -14,7 +14,7 @@ gist::123456[]
== GistBlockMacro
-[source,ruby]
+[,ruby]
----
class GistBlockMacro < Asciidoctor::Extensions::BlockMacroProcessor
use_dsl
@@ -38,7 +38,7 @@ end
== Usage
-[source,ruby]
+[,ruby]
----
Asciidoctor::Extensions.register do
block_macro GistBlockMacro if document.basebackend? 'html'
diff --git a/docs/modules/extensions/pages/block-processor.adoc b/docs/modules/extensions/pages/block-processor.adoc
index f6eb179b..40ebca6f 100644
--- a/docs/modules/extensions/pages/block-processor.adoc
+++ b/docs/modules/extensions/pages/block-processor.adoc
@@ -6,7 +6,7 @@ Register a custom block style named `shout` that uppercases all the words and co
== sample-with-shout-block.adoc
-[source,asciidoc]
+[,asciidoc]
----
[shout]
The time is now. Get a move on.
@@ -14,7 +14,7 @@ The time is now. Get a move on.
== ShoutBlock
-[source,ruby]
+[,ruby]
----
class ShoutBlock < Asciidoctor::Extensions::BlockProcessor
PeriodRx = /\.(?= |$)/
@@ -35,7 +35,7 @@ end
== Usage
-[source,ruby]
+[,ruby]
----
Asciidoctor::Extensions.register do
block ShoutBlock
diff --git a/docs/modules/extensions/pages/compound-block-processor.adoc b/docs/modules/extensions/pages/compound-block-processor.adoc
index cd88a3b6..f225f1e9 100644
--- a/docs/modules/extensions/pages/compound-block-processor.adoc
+++ b/docs/modules/extensions/pages/compound-block-processor.adoc
@@ -21,7 +21,7 @@ Register a custom block named `collapsible` that transforms a listing block into
....
.collapsible-block.rb
-[source,ruby]
+[,ruby]
----
class CollapsibleBlock < Asciidoctor::Extensions::BlockProcessor
enable_dsl
diff --git a/docs/modules/extensions/pages/docinfo-processor.adoc b/docs/modules/extensions/pages/docinfo-processor.adoc
index 636b24a0..95372289 100644
--- a/docs/modules/extensions/pages/docinfo-processor.adoc
+++ b/docs/modules/extensions/pages/docinfo-processor.adoc
@@ -6,7 +6,7 @@ Appends the Google Analytics tracking code to the bottom of an HTML document.
== GoogleAnalyticsDocinfoProcessor
-[source,ruby]
+[,ruby]
----
class GoogleAnalyticsDocinfoProcessor < Asciidoctor::Extensions::DocinfoProcessor
use_dsl
@@ -27,7 +27,7 @@ end
== Usage
-[source,ruby]
+[,ruby]
----
Asciidoctor::Extensions.register do
docinfo_processor GoogleAnalyticsDocinfoProcessor
diff --git a/docs/modules/extensions/pages/include-processor.adoc b/docs/modules/extensions/pages/include-processor.adoc
index cf627562..4c7ed13d 100644
--- a/docs/modules/extensions/pages/include-processor.adoc
+++ b/docs/modules/extensions/pages/include-processor.adoc
@@ -13,7 +13,7 @@ TIP: Asciidoctor supports including content from a URI out of the box if you set
:source-highlighter: coderay
.Gemfile
-[source,ruby]
+[,ruby]
----
\include::https://cdn.jsdelivr.net/gh/asciidoctor/asciidoctor/Gemfile[]
----
@@ -21,7 +21,7 @@ TIP: Asciidoctor supports including content from a URI out of the box if you set
== UriIncludeProcessor
-[source,ruby]
+[,ruby]
----
class UriIncludeProcessor < Asciidoctor::Extensions::IncludeProcessor
def handles? target
@@ -38,7 +38,7 @@ end
== Usage
-[source,ruby]
+[,ruby]
----
Asciidoctor::Extensions.register do
include_processor UriIncludeProcessor
diff --git a/docs/modules/extensions/pages/inline-macro-processor.adoc b/docs/modules/extensions/pages/inline-macro-processor.adoc
index cb28f628..a2d0628a 100644
--- a/docs/modules/extensions/pages/inline-macro-processor.adoc
+++ b/docs/modules/extensions/pages/inline-macro-processor.adoc
@@ -6,14 +6,14 @@ Create an inline macro named `man` that links to another man page.
== sample-with-man-link.adoc
-[source,asciidoc]
+[,asciidoc]
----
See man:gittutorial[7] to get started.
----
== ManpageInlineMacro
-[source,ruby]
+[,ruby]
----
class ManInlineMacro < Asciidoctor::Extensions::InlineMacroProcessor
use_dsl
@@ -41,7 +41,7 @@ end
== Usage
-[source,ruby]
+[,ruby]
----
Asciidoctor::Extensions.register do
inline_macro ManInlineMacro
diff --git a/docs/modules/extensions/pages/postprocessor.adoc b/docs/modules/extensions/pages/postprocessor.adoc
index 130ca547..cba64734 100644
--- a/docs/modules/extensions/pages/postprocessor.adoc
+++ b/docs/modules/extensions/pages/postprocessor.adoc
@@ -6,7 +6,7 @@ Insert copyright text in the footer.
== CopyrightFooterPostprocessor
-[source,ruby]
+[,ruby]
----
class CopyrightFooterPostprocessor < Asciidoctor::Extensions::Postprocessor
def process document, output
@@ -25,7 +25,7 @@ end
== Usage
-[source,ruby]
+[,ruby]
----
Asciidoctor::Extensions.register do
postprocessor CopyrightFooterPostprocessor
diff --git a/docs/modules/extensions/pages/preprocessor.adoc b/docs/modules/extensions/pages/preprocessor.adoc
index 83c48026..0465773e 100644
--- a/docs/modules/extensions/pages/preprocessor.adoc
+++ b/docs/modules/extensions/pages/preprocessor.adoc
@@ -50,7 +50,7 @@ content
=== FrontMatterPreprocessor
-[source,ruby]
+[,ruby]
----
class FrontMatterPreprocessor < Asciidoctor::Extensions::Preprocessor
def process document, reader
@@ -80,7 +80,7 @@ end
=== Usage
-[source,ruby]
+[,ruby]
----
Asciidoctor::Extensions.register do
preprocessor FrontMatterPreprocessor
diff --git a/docs/modules/extensions/pages/register.adoc b/docs/modules/extensions/pages/register.adoc
index 468398ef..d2ca56ef 100644
--- a/docs/modules/extensions/pages/register.adoc
+++ b/docs/modules/extensions/pages/register.adoc
@@ -4,7 +4,7 @@
These extensions are registered per document using a callback that feels like a DSL:
-[source,ruby]
+[,ruby]
----
Asciidoctor::Extensions.register do |document|
preprocessor FrontMatterPreprocessor
diff --git a/docs/modules/extensions/pages/tree-processor.adoc b/docs/modules/extensions/pages/tree-processor.adoc
index 39fedff9..23add3bf 100644
--- a/docs/modules/extensions/pages/tree-processor.adoc
+++ b/docs/modules/extensions/pages/tree-processor.adoc
@@ -17,7 +17,7 @@ Detect literal blocks that contain shell commands, strip the prompt character an
=== sample-with-shell-session.adoc
-[source,asciidoc]
+[,asciidoc]
----
$ echo "Hello, World!"
> Hello, World!
@@ -27,7 +27,7 @@ Detect literal blocks that contain shell commands, strip the prompt character an
=== ShellSessionTreeProcessor
-[source,ruby]
+[,ruby]
----
class ShellSessionTreeProcessor < Asciidoctor::Extensions::TreeProcessor
LF = ?\n
@@ -60,7 +60,7 @@ end
=== Usage
-[source,ruby]
+[,ruby]
----
Asciidoctor::Extensions.register do
tree_processor ShellSessionTreeProcessor
diff --git a/docs/modules/html-backend/pages/custom-stylesheet.adoc b/docs/modules/html-backend/pages/custom-stylesheet.adoc
index d808d9f9..35be2559 100644
--- a/docs/modules/html-backend/pages/custom-stylesheet.adoc
+++ b/docs/modules/html-backend/pages/custom-stylesheet.adoc
@@ -18,7 +18,7 @@ To keep it simple, we'll just define a basic stylesheet that changes all text to
Create the file [.path]_my-stylesheet.css_ the directory with your AsciiDoc source files and populate it with the following contents:
.my-stylesheet.css
-[source,css]
+[,css]
----
body {
color: #ff0000;
@@ -31,7 +31,7 @@ The `stylesheet` document attribute must be set by the end of the header to be e
One way to do that is to set the attribute in the document header:
.stylesheet attribute set in document header
-[source,asciidoc]
+[,asciidoc]
----
include::example$my-document.adoc[tag=title]
:stylesheet: my-stylesheet.css
@@ -75,7 +75,7 @@ The `stylesdir` document attribute must be set by the end of the header to be ef
One way to do that is to set the attribute in the document header:
.stylesdir attribute set in document header
-[source,asciidoc]
+[,asciidoc]
----
include::example$my-document.adoc[tag=title]
:stylesheet: my-stylesheet.css
@@ -113,7 +113,7 @@ If you invoke Asciidoctor as follows:
Then when you inspect the HTML, you will see:
-[source,html]
+[,html]
----
<link rel="stylesheet" href="my-styles/asciidoctor.css">
----
@@ -130,7 +130,7 @@ We'll specify the location of `stylesdir` as an absolute path and generate the o
Asciidoctor generates the HTML file into the [.path]_public_ folder, but it does not copy the stylesheet.
Furthermore, it uses an absolute path in the link to the stylesheet:
-[source,html]
+[,html]
----
<link rel="stylesheet" href="/path/to/documents/my-styles/asciidoctor.css">
----
@@ -189,14 +189,14 @@ Let's say you have three AsciiDoc documents saved in the following directory str
For [.path]_a.adoc_ and [.path]_b.adoc_, set `stylesdir` to:
-[source,asciidoc]
+[,asciidoc]
----
:stylesdir: my-styles
----
For [.path]_c.adoc_, set `stylesdir` to:
-[source,asciidoc]
+[,asciidoc]
----
:stylesdir: ../my-styles
----
diff --git a/docs/modules/html-backend/pages/default-stylesheet.adoc b/docs/modules/html-backend/pages/default-stylesheet.adoc
index 48a6d2e4..6c2cdca8 100644
--- a/docs/modules/html-backend/pages/default-stylesheet.adoc
+++ b/docs/modules/html-backend/pages/default-stylesheet.adoc
@@ -83,7 +83,7 @@ Otherwise, the browser will not be able to find the stylesheet.
To solve this problem, set the safe mode to server or lower (e.g., server, safe, or unsafe) and Asciidoctor will embed the default stylesheet, like when using the `asciidoctor` command.
-[source,ruby]
+[,ruby]
----
require 'asciidoctor'
@@ -133,7 +133,7 @@ Let's say you want to change the color of headings (and other heading-like title
Start by creating a file named [.path]_docinfo.html_ (head is the default location) and populate it with a `<style>` element with the necessary styles.
.docinfo.html
-[source,html]
+[,html]
----
<style>
h1, h2, h3, h4, h5, h6, #toctitle,
@@ -183,7 +183,7 @@ Then, add another `@import` declaration to import the web fonts the default styl
Finally, add your overrides below those `@import` directives.
Here's how that looks altogether.
-[source,css,subs=attributes+]
+[,css,subs=attributes+]
----
@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700";
@import "{url-default-stylesheet}";
diff --git a/docs/modules/html-backend/pages/favicon.adoc b/docs/modules/html-backend/pages/favicon.adoc
index 51a0fa6b..d46ae71d 100644
--- a/docs/modules/html-backend/pages/favicon.adoc
+++ b/docs/modules/html-backend/pages/favicon.adoc
@@ -2,7 +2,7 @@
When using Asciidoctor to generate a standalone HTML document (i.e., the `standalone` option is `true`), you can instruct the processor to include a link to a favicon by setting the favicon attribute in the document header.
-[source,asciidoc]
+[,asciidoc]
----
= Document Title
:favicon:
@@ -10,7 +10,7 @@ When using Asciidoctor to generate a standalone HTML document (i.e., the `standa
By default, the processor will add a link reference of type "icon" that refers to a file named _favicon.ico_ (relative to the HTML document):
-[source,html]
+[,html]
----
<link rel="icon" type="image/x-icon" href="favicon.ico">
----
@@ -19,7 +19,7 @@ This reference gets added inside the HTML `<head>` element (which explains why t
To modify the name or location of the icon file, simply assign a value to the favicon attribute:
-[source,asciidoc]
+[,asciidoc]
----
= Document Title
:favicon: ./images/favicon/favicon.png
@@ -27,7 +27,7 @@ To modify the name or location of the icon file, simply assign a value to the fa
This will now produce the following HTML element:
-[source,html]
+[,html]
----
<link rel="icon" type="image/png" href="./images/favicon/favicon.png">
----
@@ -37,7 +37,7 @@ Notice the mimetype is automatically set based on the file extension of the imag
The value of the `iconsdir` attribute is not prepend to the favicon path as it is with icons in the content.
If you want this directory to be included in the favicon path, you must reference it explicitly:
-[source,asciidoc]
+[,asciidoc]
----
:favicon: {iconsdir}/favicon.png
----
diff --git a/docs/modules/html-backend/pages/manage-images.adoc b/docs/modules/html-backend/pages/manage-images.adoc
index 94323a93..19ccf172 100644
--- a/docs/modules/html-backend/pages/manage-images.adoc
+++ b/docs/modules/html-backend/pages/manage-images.adoc
@@ -8,7 +8,7 @@ If you have image references in your document, you'll have to save the image fil
As an alternative, you can embed the images directly into the document by setting the `data-uri` document attribute.
.data-uri attribute set in document header
-[source,asciidoc]
+[,asciidoc]
----
include::example$my-document.adoc[tag=title]
:imagesdir: my-images
diff --git a/docs/modules/html-backend/pages/skip-front-matter.adoc b/docs/modules/html-backend/pages/skip-front-matter.adoc
index 0eb065d5..35433c04 100644
--- a/docs/modules/html-backend/pages/skip-front-matter.adoc
+++ b/docs/modules/html-backend/pages/skip-front-matter.adoc
@@ -7,7 +7,7 @@ Front matter typically starts on the first line of a file and is bounded by bloc
Here's an example of a document that contains front matter:
-[source,asciidoc]
+[,asciidoc]
----
--- <.>
layout: default <.>
diff --git a/docs/modules/html-backend/pages/stylesheet-modes.adoc b/docs/modules/html-backend/pages/stylesheet-modes.adoc
index 6b5da929..08066664 100644
--- a/docs/modules/html-backend/pages/stylesheet-modes.adoc
+++ b/docs/modules/html-backend/pages/stylesheet-modes.adoc
@@ -35,7 +35,7 @@ The `linkcss` document attribute must be set by the end of the header to be effe
One way to do that is to set the attribute in the document header:
.linkcss attribute set in document header
-[source,asciidoc]
+[,asciidoc]
----
include::example$my-document.adoc[tag=title]
:linkcss:
@@ -49,7 +49,7 @@ You can also set `linkcss` using the API or CLI (shown here):
In either case, if you inspect the `<head>` element in the output file [.path]_my-document.html_, you'll see that the HTML links to the stylesheet.
.my-document.html
-[source,html]
+[,html]
----
<link rel="stylesheet" href="./asciidoctor.css">
----
@@ -100,7 +100,7 @@ The `copycss` document attribute must be unset by the end of the header to be ef
One way to do that is to unset the attribute in the document header:
.copycss attribute unset in document header
-[source,asciidoc]
+[,asciidoc]
----
include::example$my-document.adoc[tag=title]
:linkcss:
diff --git a/docs/modules/install/pages/ruby-packaging.adoc b/docs/modules/install/pages/ruby-packaging.adoc
index 52c51e25..171dfaf4 100644
--- a/docs/modules/install/pages/ruby-packaging.adoc
+++ b/docs/modules/install/pages/ruby-packaging.adoc
@@ -43,7 +43,7 @@ Note that it's possible that the prerelease version is older than the latest sta
. Create a Gemfile in the root folder of your project (or the current directory)
. Add the `asciidoctor` gem to your Gemfile as follows:
+
-[source,ruby,subs=attributes+]
+[,ruby,subs=attributes+]
----
source 'https://rubygems.org'
gem 'asciidoctor'
diff --git a/docs/modules/migrate/pages/asciidoc-py.adoc b/docs/modules/migrate/pages/asciidoc-py.adoc
index 030aceaf..484a7b4d 100644
--- a/docs/modules/migrate/pages/asciidoc-py.adoc
+++ b/docs/modules/migrate/pages/asciidoc-py.adoc
@@ -293,7 +293,7 @@ Here are the equivalents of the old attributes using the new values:
In AsciiDoc.py, single line comments could be turned into DocBook `<remark>` elements using `showcomments`.
This feature isn't implemented in Asciidoctor, but you can send remarks to the output, using an extension, or ifdef directives and passthrough blocks like the example shown below.
-[source,asciidoc]
+[,asciidoc]
----
\ifdef::showcomments+basebackend-docbook[]
++++
@@ -491,7 +491,7 @@ This content needs to be move to the specific subject docs pages if applicable
Asciidoctor has shorthand for id, role, style and options.
The following longhand syntax in AsciiDoc.py:
-[source,asciidoc]
+[,asciidoc]
----
[[id]]
[style,role="role",options="option1,option2"]
@@ -499,7 +499,7 @@ The following longhand syntax in AsciiDoc.py:
can be written using the shorthand supported by Asciidoctor:
-[source,asciidoc]
+[,asciidoc]
----
[style#id.role%option1%option2]
----
diff --git a/docs/modules/migrate/pages/confluence-xhtml.adoc b/docs/modules/migrate/pages/confluence-xhtml.adoc
index 263b0dd2..2d052b10 100644
--- a/docs/modules/migrate/pages/confluence-xhtml.adoc
+++ b/docs/modules/migrate/pages/confluence-xhtml.adoc
@@ -9,7 +9,7 @@ You'll need Pandoc installed before running this script.
If you have trouble running this script, you can use the Pandoc command referenced inside the script to convert XHTML files to AsciiDoc manually.
.convert.groovy
-[source,groovy]
+[,groovy]
----
include::example$convert.groovy[]
----
diff --git a/docs/modules/stem/pages/asciimath-gem.adoc b/docs/modules/stem/pages/asciimath-gem.adoc
index a8e1213f..cfd1979f 100644
--- a/docs/modules/stem/pages/asciimath-gem.adoc
+++ b/docs/modules/stem/pages/asciimath-gem.adoc
@@ -41,7 +41,7 @@ First, activate STEM support in AsciiDoc by setting the `stem` document attribut
This attribute must be set by the end of the document header.
.Activate STEM support by setting the stem document attribute
-[source,asciidoc]
+[,asciidoc]
----
= Document Title
:stem:
@@ -55,7 +55,7 @@ Now let's convert this document to DocBook using the DocBook converter:
The DocBook converter will emit the following XML into the generated document:
-[source,xml]
+[,xml]
----
<inlineequation><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:msqrt><mml:mn>4</mml:mn></mml:msqrt></mml:math></inlineequation>
----
diff --git a/docs/modules/stem/pages/mathematical.adoc b/docs/modules/stem/pages/mathematical.adoc
index 9acd241a..d81d7e32 100644
--- a/docs/modules/stem/pages/mathematical.adoc
+++ b/docs/modules/stem/pages/mathematical.adoc
@@ -64,7 +64,7 @@ Once Asciidoctor Mathematical is installed, you can activate the extension when
If you're invoking Asciidoctor via the API, you must require the gem before invoking Asciidoctor:
-[source,ruby]
+[,ruby]
----
require 'asciidoctor-mathematical'
diff --git a/docs/modules/stem/pages/mathjax.adoc b/docs/modules/stem/pages/mathjax.adoc
index 8371d1a8..487bb1ac 100644
--- a/docs/modules/stem/pages/mathjax.adoc
+++ b/docs/modules/stem/pages/mathjax.adoc
@@ -15,7 +15,7 @@ If you convert your document to HTML using the HTML converter, and the `stem` do
There's nothing you have to install.
Specifically, it loads the MathJax bundle that includes support for both TeX and AsciiMath, as shown here:
-[source,html]
+[,html]
----
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.9/MathJax.js?config=TeX-MML-AM_HTMLorMML"></script>
----
diff --git a/docs/modules/syntax-highlighting/pages/coderay.adoc b/docs/modules/syntax-highlighting/pages/coderay.adoc
index f59b492f..7d12bdc3 100644
--- a/docs/modules/syntax-highlighting/pages/coderay.adoc
+++ b/docs/modules/syntax-highlighting/pages/coderay.adoc
@@ -4,20 +4,19 @@
{url-coderay}[CodeRay^] is an encoding-aware, syntax highlighter that supports the languages listed below.
-[%autowidth,cols="3*",grid=none,frame=none]
+[%autowidth,cols="4*",grid=none,frame=none]
|===
| C
| C++
| Clojure
-
| CSS
+
| Delphi
| diff
-
| ERB
| Go
-| Groovy
+| Groovy
| HAML
| HTML
| Java
@@ -25,15 +24,14 @@
| JavaScript
| JSON
| Lua
-
| PHP
+
| Python
| Ruby
-
| Sass
| SQL
-| Taskpaper
+| Taskpaper
| XML
| YAML
|
@@ -60,7 +58,7 @@ Install using dnf (Fedora-based systems)::
Once you've installed the gem, assign the `coderay` value to the `source-highlighter` attribute in the document header to activate it.
-[source,asciidoc]
+[,asciidoc]
----
:source-highlighter: coderay
----
@@ -86,7 +84,7 @@ Default: `table`.
:source-highlighter: coderay
:coderay-linenums-mode: inline
-[source%linenums,ruby]
+[%linenums,ruby]
----
ORDERED_LIST_KEYWORDS = {
'loweralpha' => 'a',
diff --git a/docs/modules/syntax-highlighting/pages/highlightjs.adoc b/docs/modules/syntax-highlighting/pages/highlightjs.adoc
index 50ee90ba..efa6384c 100644
--- a/docs/modules/syntax-highlighting/pages/highlightjs.adoc
+++ b/docs/modules/syntax-highlighting/pages/highlightjs.adoc
@@ -9,7 +9,7 @@
To activate highlight.js, add the following attribute entry to the header of your AsciiDoc file:
-[source,asciidoc]
+[,asciidoc]
----
:source-highlighter: highlight.js
----
@@ -25,7 +25,7 @@ Separate each language by a comma followed by an optional space.
The common highlight.js bundle does not include support for Rust and Swift.
Let's set the `highlightjs-languages` attribute so the HTML converter loads support for them into the HTML page.
-[source,asciidoc]
+[,asciidoc]
----
:source-highlighter: highlight.js
:highlightjs-languages: rust, swift
diff --git a/docs/modules/syntax-highlighting/pages/index.adoc b/docs/modules/syntax-highlighting/pages/index.adoc
index e63609d8..9cf5257b 100644
--- a/docs/modules/syntax-highlighting/pages/index.adoc
+++ b/docs/modules/syntax-highlighting/pages/index.adoc
@@ -11,9 +11,20 @@ puts "Hello, World!"
----
....
+If a language is specified on a listing block, the source style is implied.
+Therefore, it can be excluded in this case.
+
+[source,asciidoc]
+....
+[,ruby]
+----
+puts "Hello, World!"
+----
+....
+
Here's how we expect it to appear:
-[source,ruby]
+[,ruby]
----
puts "Hello, World!"
----
diff --git a/docs/modules/syntax-highlighting/pages/pygments.adoc b/docs/modules/syntax-highlighting/pages/pygments.adoc
index 77997004..7af0e3ed 100644
--- a/docs/modules/syntax-highlighting/pages/pygments.adoc
+++ b/docs/modules/syntax-highlighting/pages/pygments.adoc
@@ -70,7 +70,7 @@ Default: `table`.
:pygments-style: manni
:pygments-linenums-mode: inline
-[source%linenums,ruby]
+[%linenums,ruby]
----
ORDERED_LIST_KEYWORDS = {
'loweralpha' => 'a',
@@ -133,7 +133,7 @@ Let's call it [.path]_pygments_init.rb_.
Populate the script with the following content:
.pygments_init.rb
-[source,ruby]
+[,ruby]
----
require 'pygments'
@@ -154,7 +154,7 @@ When using the `asciidoctor` command, pass the script using the `-r` flag:
When using the Asciidoctor API, require the script using `require` or `require_relative`:
-[source,ruby]
+[,ruby]
----
require 'asciidoctor'
require_relative './pygments_init.rb'
diff --git a/docs/modules/syntax-highlighting/pages/rouge.adoc b/docs/modules/syntax-highlighting/pages/rouge.adoc
index 3ddf4dab..784f36e9 100644
--- a/docs/modules/syntax-highlighting/pages/rouge.adoc
+++ b/docs/modules/syntax-highlighting/pages/rouge.adoc
@@ -30,7 +30,7 @@ Install using `pacman` (Arch Linux-based systems)::
Once you've installed the gem, assign the `rouge` value to the `source-highlighter` attribute in the document header to activate it.
-[source,asciidoc]
+[,asciidoc]
----
:source-highlighter: rouge
----
@@ -63,7 +63,7 @@ However, you can define them per document as shown in the following example.
:source-highlighter: rouge
:rouge-style: monokai
-[source,ruby]
+[,ruby]
----
puts "Hello, Rouge!"
----
@@ -76,7 +76,7 @@ You can enable line numbering using the linenums option on the block.
....
:source-highlighter: rouge
-[source%linenums,ruby]
+[%linenums,ruby]
----
ORDERED_LIST_KEYWORDS = {
'loweralpha' => 'a',