Asciidoctor Upgrade Notes
Antora 3.0 uses Asciidoctor.js 2.2.x (Asciidoctor 2.0.x) instead of Asciidoctor.js 1.5.9 (Asciidoctor 1.5.8) to process content files. Asciidoctor 2 introduces many new features and a few substantive changes to existing features.
Asciidoctor 2 feature changes
The following sections describe the new behavior of existing Asciidoctor features and suggest the actions you should take prior to upgrading to Antora 3.0.
Non-AsciiDoc files and the include directive
Feature | New behavior | Action |
---|---|---|
Including non-AsciiDoc files using the include directive, particularly inside verbatim (listing, literal, or source) blocks |
Trailing space characters aren’t removed, tabs aren’t expanded, and newlines aren’t normalized when including a non-AsciiDoc file using the include directive. This can change how the output is displayed. |
|
Including non-AsciiDoc files with the |
Since tabs aren’t expanded in the non-AsciiDoc content, the |
|
Including non-AsciiDoc files with callouts into a verbatim block using the include directive |
Since trailing spaces aren’t removed, callout numbers may no longer be detected. |
Listing and source blocks
Feature | New behavior | Action |
---|---|---|
Delimited listing blocks without an explicit style when |
Delimited listing blocks ( |
If If
See Source Blocks to learn more. |
Source blocks that aren’t assigned a language |
The language The block is styled like other source blocks, but no syntax highlighting is applied. |
If this behavior is acceptable, no change is needed. Otherwise, do one of the following:
See Source Blocks to learn more. |
Tables
Feature | New behavior | Action |
---|---|---|
|
Normal substitutions and default header formatting are now correctly applied to the cells in an implicit header row when the AsciiDoc ( |
Update tables that use the |
|
The verse modifier ( |
No action is needed if it’s acceptable for the cell content to be displayed as regular content. |
|
The CSS class |
If you customized the styles for |
Table column width |
The rounding used when calculating table column widths changed minutely. |
No action is needed as the change shouldn’t be noticeable to site visitors. |
Lists
Feature | New behavior | Action |
---|---|---|
Description list delimiters ( |
Description list delimiters, that is, double colons ( |
Remove escape syntax around double colons ( |
Section and block titles
Feature | New behavior | Action |
---|---|---|
Section and block title substitution order |
The order of substitutions applied to section and block titles now matches the normal substitution order. This can affect section and block titles that use attribute references. |
Review section and block titles that contain attribute references for errors. |
Invalid and unresolved references and attributes
Feature | New behavior | Action |
---|---|---|
“Unresolved include directive” message in the content |
The message has changed to “Unresolved directive”. |
No action unless you’re using a postprocessor that looks for this message in the output. |
|
The class |
You will need to update the selector in your CSS or postprocessor if it attempts to match this class.
You can now find all xref links in the page using the CSS selector |
|
The class |
You will need to update the selector in your CSS or postprocessor if it attempts to match this class. |
Reference validation for inline anchor |
If Asciidoctor cannot locate a reference to an inline anchor, even if it exists, it will log a message at the info level about a possible invalid reference. |
Define inline anchors using the double square bracket enclosure, and only place them in locations where Asciidoctor scans for them. Valid locations include anywhere in paragraph text or at the start of a list item or table cell. You could also ignore these messages or not enable the info log level. |
|
The |
Check the log messages for new warnings and fix any reported errors. |
Footnotes
Feature | New behavior | Action |
---|---|---|
Footnote macro |
The |
Change |
Anchors and xrefs in footnotes |
Anchor and xref macros are processed before footnote macros so that footnote macros aren’t terminated prematurely. |
Remove escape syntax, such as a backslash ( |
Quote block
Feature | New behavior | Action |
---|---|---|
|
The 2-character |
Remove the deprecated |
Encoding
Feature | New behavior | Action |
---|---|---|
Encode characters in email address to comply with RFC-3986 |
Previously, spaces in an email address were encoded as |
This change will not affect the behavior of email links. |
Semantic versioning and Asciidoctor 2
Starting with Asciidoctor 2.0.0, Asciidoctor and Asciidoctor.js switched to semantic versioning. This allows Antora to automatically pick up the latest patch versions of Asciidoctor.js during installation without having to make a new Antora release available.
Ready to upgrade to Antora 3.0? See Upgrade Antora for instructions. |