diff --git a/autotests/folding/asciidoc.adoc.fold b/autotests/folding/asciidoc.adoc.fold --- a/autotests/folding/asciidoc.adoc.fold +++ b/autotests/folding/asciidoc.adoc.fold @@ -506,7 +506,7 @@ The third reference has <> as label. -A reference defintion inside the text instead of the bibliography section yields some strange result: [[[ref-o,outside bibliography]]]]. +A reference definition inside the text instead of the bibliography section yields some strange result: [[[ref-o,outside bibliography]]]]. Not sure what to do with this. This is trying to use the escaped reference <>. @@ -675,6 +675,8 @@ A countiguous *listing* block. Last line of the listing. +This line is not part of the contiguous block anymore. + .Delimited with block name [listing] [[listing-block-id]] @@ -715,6 +717,8 @@ So there is *no* text formatting. // this should not be highlighted as comment +This line is not part of the contiguous block anymore. + .Delimited with block name [literal] // some comment @@ -940,9 +944,6 @@ == Nested Blocks -[NOTE] -Some note text. - ==== Start of outer example block. @@ -1219,7 +1220,7 @@ //// FIXME Highlighting differs. The phrase is rendered as marked. -Thetrailing hash is therefore not visible. +The trailing hash is therefore not visible. //// [big]###text### @@ -1300,11 +1301,11 @@ === Rendered as-is -This line does _not_ contain _some emphasized _ text as there is a surplus space. +This line does not contain _some emphasized _ text as there is a surplus space. -This line does _not_ contain_some emphasized_ text as there is a space missing. +This line does not contain_some emphasized_ text as there is a space missing. -This line does _not_ contain _some emphasized_text as there is a space missing. +This line does not contain _some emphasized_text as there is a space missing. foo ;_emphasized_ :_emphasized_ }_emphasized_ @@ -1723,20 +1724,20 @@ == Included Contents Rendered +IMPORTANT: The include directive is _always_ processed, even withing passthrough blocks. + NOTE: Using file names with spaces works. include::{includedir}/demo.adoc[] .Partial include include::{includedir}/demo.adoc[lines=2..3] .Inside contiguous block -[source,ruby] -IO.puts 'hello' -""" +[literal] +This line shall be highlighted as verbatim. include::{includedir}/demo.adoc[lines=2..3] -""" -IO.puts 'bye' +This line shall be highlighted as verbatim. .Inside delimited block with name [literal] @@ -1753,6 +1754,19 @@ This line shall be highlighted as verbatim. .... +.It is also processed within passthrough blocks +[pass] +This line shall be highlighted as passthrough. +include::{includedir}/demo.adoc[lines=2..3] +This line shall be highlighted as passthrough. + +[pass] +-- +This line shall be highlighted as passthrough. +include::{includedir}/demo.adoc[lines=2..3] +This line shall be highlighted as passthrough. +-- + .Inside table |=== |row 1 col 1|row 2 col 2 @@ -1766,14 +1780,6 @@ |=== -== Rendered as-is - -.Inside verbatim paragraph - This line shall be highlighted as verbatim. -include::{includedir}/demo.adoc[lines=2..3] -This line shall be highlighted as verbatim. - - = Index == Rendered as Index Term @@ -1818,6 +1824,7 @@ This is not a \indexterm:[concealed, index, term] concealed index term. + [index] == Index Catalog @@ -2079,7 +2086,6 @@ [qanda] What is Asciidoctor?:: An implementation of the AsciiDoc processor in Ruby. -& answer pairs. Must the answer be indented?:: It's not necessary, but possibly. What is the answer to the Ultimate Question?:: 42 @@ -2154,6 +2160,8 @@ == Pass +// TODO Would be nice to highlight the text within the square bracktes as passthrough. + Some pass:[passthrough] HTML. Some pass:quotes[passthrough with *quoted* text] HTML. @@ -2213,7 +2221,7 @@ .Test SVG [#logo] [link=https://github.com/asciidoctor/brand] -image::test.svg[Asciidoctor Logo, 100] +image::test.svg[Test, 100] ==== Not highlighted @@ -2265,7 +2273,6 @@ video::test.mp4[width=300] - video::test.mp4[width=200, options=loop] .Escaped @@ -2653,15 +2660,18 @@ This section has trailing additional anchors. + ==== [[id-1]][[id-2]]Section L3[[id-3]][[id-4]] This section has both leading and trailing additional anchors. + ==== Section L3 {title-attribute} in Title .Title {title-attribute} This section has an attribute in its title. + [discrete] == Discrete Section @@ -2689,6 +2699,7 @@ === Section with escaped \*strong* text //// + = Another Section at Level 0 diff --git a/autotests/html/asciidoc.adoc.html b/autotests/html/asciidoc.adoc.html --- a/autotests/html/asciidoc.adoc.html +++ b/autotests/html/asciidoc.adoc.html @@ -512,7 +512,7 @@ The third reference has <<r3>> as label. -A reference defintion inside the text instead of the bibliography section yields some strange result: [[[ref-o,outside bibliography]]]]. +A reference definition inside the text instead of the bibliography section yields some strange result: [[[ref-o,outside bibliography]]]]. Not sure what to do with this. This is trying to use the escaped reference <<r4>>. @@ -681,6 +681,8 @@ A countiguous *listing* block. Last line of the listing. +This line is not part of the contiguous block anymore. + .Delimited with block name [listing] [[listing-block-id]] @@ -721,6 +723,8 @@ So there is *no* text formatting. // this should not be highlighted as comment +This line is not part of the contiguous block anymore. + .Delimited with block name [literal] // some comment @@ -946,9 +950,6 @@ == Nested Blocks -[NOTE] -Some note text. - ==== Start of outer example block. @@ -1225,7 +1226,7 @@ //// FIXME Highlighting differs. The phrase is rendered as marked. -Thetrailing hash is therefore not visible. +The trailing hash is therefore not visible. //// [big]###text### @@ -1306,11 +1307,11 @@ === Rendered as-is -This line does _not_ contain _some emphasized _ text as there is a surplus space. +This line does not contain _some emphasized _ text as there is a surplus space. -This line does _not_ contain_some emphasized_ text as there is a space missing. +This line does not contain_some emphasized_ text as there is a space missing. -This line does _not_ contain _some emphasized_text as there is a space missing. +This line does not contain _some emphasized_text as there is a space missing. foo ;_emphasized_ :_emphasized_ }_emphasized_ @@ -1729,20 +1730,20 @@ == Included Contents Rendered +IMPORTANT: The include directive is _always_ processed, even withing passthrough blocks. + NOTE: Using file names with spaces works. include::{includedir}/demo.adoc[] .Partial include include::{includedir}/demo.adoc[lines=2..3] .Inside contiguous block -[source,ruby] -IO.puts 'hello' -""" -include::{includedir}/demo.adoc[lines=2..3] -""" -IO.puts 'bye' +[literal] +This line shall be highlighted as verbatim. +include::{includedir}/demo.adoc[lines=2..3] +This line shall be highlighted as verbatim. .Inside delimited block with name [literal] @@ -1759,6 +1760,19 @@ This line shall be highlighted as verbatim. .... +.It is also processed within passthrough blocks +[pass] +This line shall be highlighted as passthrough. +include::{includedir}/demo.adoc[lines=2..3] +This line shall be highlighted as passthrough. + +[pass] +-- +This line shall be highlighted as passthrough. +include::{includedir}/demo.adoc[lines=2..3] +This line shall be highlighted as passthrough. +-- + .Inside table |=== |row 1 col 1|row 2 col 2 @@ -1772,14 +1786,6 @@ |=== -== Rendered as-is - -.Inside verbatim paragraph - This line shall be highlighted as verbatim. -include::{includedir}/demo.adoc[lines=2..3] -This line shall be highlighted as verbatim. - - = Index == Rendered as Index Term @@ -1824,6 +1830,7 @@ This is not a \indexterm:[concealed, index, term] concealed index term. + [index] == Index Catalog @@ -2085,7 +2092,6 @@ [qanda] What is Asciidoctor?:: An implementation of the AsciiDoc processor in Ruby. -& answer pairs. Must the answer be indented?:: It's not necessary, but possibly. What is the answer to the Ultimate Question?:: 42 @@ -2160,6 +2166,8 @@ == Pass +// TODO Would be nice to highlight the text within the square bracktes as passthrough. + Some pass:[<u>passthrough</u>] HTML. Some pass:quotes[<u>passthrough with *quoted* text</u>] HTML. @@ -2219,7 +2227,7 @@ .Test SVG [#logo] [link=https://github.com/asciidoctor/brand] -image::test.svg[Asciidoctor Logo, 100] +image::test.svg[Test, 100] ==== Not highlighted @@ -2271,7 +2279,6 @@ video::test.mp4[width=300] - video::test.mp4[width=200, options=loop] .Escaped @@ -2659,15 +2666,18 @@ This section has trailing additional anchors. + ==== [[id-1]][[id-2]]Section L3[[id-3]][[id-4]] This section has both leading and trailing additional anchors. + ==== Section L3 {title-attribute} in Title .Title {title-attribute} This section has an attribute in its title. + [discrete] == Discrete Section @@ -2695,6 +2705,7 @@ === Section with escaped \*strong* text //// + = Another Section at Level 0 diff --git a/autotests/input/asciidoc.adoc b/autotests/input/asciidoc.adoc --- a/autotests/input/asciidoc.adoc +++ b/autotests/input/asciidoc.adoc @@ -506,7 +506,7 @@ The third reference has <> as label. -A reference defintion inside the text instead of the bibliography section yields some strange result: [[[ref-o,outside bibliography]]]]. +A reference definition inside the text instead of the bibliography section yields some strange result: [[[ref-o,outside bibliography]]]]. Not sure what to do with this. This is trying to use the escaped reference <>. @@ -675,6 +675,8 @@ A countiguous *listing* block. Last line of the listing. +This line is not part of the contiguous block anymore. + .Delimited with block name [listing] [[listing-block-id]] @@ -715,6 +717,8 @@ So there is *no* text formatting. // this should not be highlighted as comment +This line is not part of the contiguous block anymore. + .Delimited with block name [literal] // some comment @@ -940,9 +944,6 @@ == Nested Blocks -[NOTE] -Some note text. - ==== Start of outer example block. @@ -1219,7 +1220,7 @@ //// FIXME Highlighting differs. The phrase is rendered as marked. -Thetrailing hash is therefore not visible. +The trailing hash is therefore not visible. //// [big]###text### @@ -1300,11 +1301,11 @@ === Rendered as-is -This line does _not_ contain _some emphasized _ text as there is a surplus space. +This line does not contain _some emphasized _ text as there is a surplus space. -This line does _not_ contain_some emphasized_ text as there is a space missing. +This line does not contain_some emphasized_ text as there is a space missing. -This line does _not_ contain _some emphasized_text as there is a space missing. +This line does not contain _some emphasized_text as there is a space missing. foo ;_emphasized_ :_emphasized_ }_emphasized_ @@ -1723,20 +1724,20 @@ == Included Contents Rendered +IMPORTANT: The include directive is _always_ processed, even withing passthrough blocks. + NOTE: Using file names with spaces works. include::{includedir}/demo.adoc[] .Partial include include::{includedir}/demo.adoc[lines=2..3] .Inside contiguous block -[source,ruby] -IO.puts 'hello' -""" +[literal] +This line shall be highlighted as verbatim. include::{includedir}/demo.adoc[lines=2..3] -""" -IO.puts 'bye' +This line shall be highlighted as verbatim. .Inside delimited block with name [literal] @@ -1753,6 +1754,19 @@ This line shall be highlighted as verbatim. .... +.It is also processed within passthrough blocks +[pass] +This line shall be highlighted as passthrough. +include::{includedir}/demo.adoc[lines=2..3] +This line shall be highlighted as passthrough. + +[pass] +-- +This line shall be highlighted as passthrough. +include::{includedir}/demo.adoc[lines=2..3] +This line shall be highlighted as passthrough. +-- + .Inside table |=== |row 1 col 1|row 2 col 2 @@ -1766,14 +1780,6 @@ |=== -== Rendered as-is - -.Inside verbatim paragraph - This line shall be highlighted as verbatim. -include::{includedir}/demo.adoc[lines=2..3] -This line shall be highlighted as verbatim. - - = Index == Rendered as Index Term @@ -1818,6 +1824,7 @@ This is not a \indexterm:[concealed, index, term] concealed index term. + [index] == Index Catalog @@ -2079,7 +2086,6 @@ [qanda] What is Asciidoctor?:: An implementation of the AsciiDoc processor in Ruby. -& answer pairs. Must the answer be indented?:: It's not necessary, but possibly. What is the answer to the Ultimate Question?:: 42 @@ -2154,6 +2160,8 @@ == Pass +// TODO Would be nice to highlight the text within the square bracktes as passthrough. + Some pass:[passthrough] HTML. Some pass:quotes[passthrough with *quoted* text] HTML. @@ -2213,7 +2221,7 @@ .Test SVG [#logo] [link=https://github.com/asciidoctor/brand] -image::test.svg[Asciidoctor Logo, 100] +image::test.svg[Test, 100] ==== Not highlighted @@ -2265,7 +2273,6 @@ video::test.mp4[width=300] - video::test.mp4[width=200, options=loop] .Escaped @@ -2653,15 +2660,18 @@ This section has trailing additional anchors. + ==== [[id-1]][[id-2]]Section L3[[id-3]][[id-4]] This section has both leading and trailing additional anchors. + ==== Section L3 {title-attribute} in Title .Title {title-attribute} This section has an attribute in its title. + [discrete] == Discrete Section @@ -2689,6 +2699,7 @@ === Section with escaped \*strong* text //// + = Another Section at Level 0 diff --git a/autotests/reference/asciidoc.adoc.ref b/autotests/reference/asciidoc.adoc.ref --- a/autotests/reference/asciidoc.adoc.ref +++ b/autotests/reference/asciidoc.adoc.ref @@ -506,7 +506,7 @@
The third reference has <> as label.

-A reference defintion inside the text instead of the bibliography section yields some strange result: [[[ref-o,outside bibliography]]]].
+A reference definition inside the text instead of the bibliography section yields some strange result: [[[ref-o,outside bibliography]]]].
Not sure what to do with this.

This is trying to use the escaped reference <>.
@@ -675,6 +675,8 @@ A countiguous *listing* block.
Last line of the listing.

+This line is not part of the contiguous block anymore.
+
.Delimited with block name
[listing]
[[listing-block-id]]
@@ -715,6 +717,8 @@ So there is *no* text formatting.
// this should not be highlighted as comment

+This line is not part of the contiguous block anymore.
+
.Delimited with block name
[literal]
// some comment
@@ -940,9 +944,6 @@
== Nested Blocks


-[NOTE]
-Some note text.
-
====
Start of outer example block.

@@ -1219,7 +1220,7 @@ ////
FIXME Highlighting differs.
The phrase is rendered as marked.
-Thetrailing hash is therefore not visible.
+The trailing hash is therefore not visible.
////
[big]###text###

@@ -1300,11 +1301,11 @@
=== Rendered as-is


-This line does _not_ contain _some emphasized _ text as there is a surplus space.
+This line does not contain _some emphasized _ text as there is a surplus space.

-This line does _not_ contain_some emphasized_ text as there is a space missing.
+This line does not contain_some emphasized_ text as there is a space missing.

-This line does _not_ contain _some emphasized_text as there is a space missing.
+This line does not contain _some emphasized_text as there is a space missing.

foo ;_emphasized_ :_emphasized_ }_emphasized_

@@ -1723,20 +1724,20 @@
== Included Contents Rendered


+IMPORTANT: The include directive is _always_ processed, even withing passthrough blocks.
+
NOTE: Using file names with spaces works.

include::{includedir}/demo.adoc[]

.Partial include
include::{includedir}/demo.adoc[lines=2..3]

.Inside contiguous block
-[source,ruby]
-IO.puts 'hello'
-"""
-include::{includedir}/demo.adoc[lines=2..3]
-"""
-IO.puts 'bye'
+[literal]
+This line shall be highlighted as verbatim.
+include::{includedir}/demo.adoc[lines=2..3]
+This line shall be highlighted as verbatim.

.Inside delimited block with name
[literal]
@@ -1753,6 +1754,19 @@ This line shall be highlighted as verbatim.
....

+.It is also processed within passthrough blocks
+[pass]
+This line shall be highlighted as passthrough.
+include::{includedir}/demo.adoc[lines=2..3]
+This line shall be highlighted as passthrough.
+
+[pass]
+--
+This line shall be highlighted as passthrough.
+include::{includedir}/demo.adoc[lines=2..3]
+This line shall be highlighted as passthrough.
+--
+
.Inside table
|===
|row 1 col 1|row 2 col 2
@@ -1766,14 +1780,6 @@ |===


-
== Rendered as-is

-
-.Inside verbatim paragraph
- This line shall be highlighted as verbatim.
-include::{includedir}/demo.adoc[lines=2..3]
-This line shall be highlighted as verbatim.
-
-
= Index


== Rendered as Index Term

@@ -1818,6 +1824,7 @@
This is not a \indexterm:[concealed, index, term] concealed index term.

+
[index]
== Index Catalog


@@ -2079,7 +2086,6 @@ [qanda]
What is Asciidoctor?::
An implementation of the AsciiDoc processor in Ruby.
-& answer pairs.
Must the answer be indented?::
It's not necessary, but possibly.
What is the answer to the Ultimate Question?:: 42
@@ -2154,6 +2160,8 @@
== Pass


+// TODO Would be nice to highlight the text within the square bracktes as passthrough.
+
Some pass:[passthrough] HTML.

Some pass:quotes[passthrough with *quoted* text] HTML.
@@ -2213,7 +2221,7 @@ .Test SVG
[#logo]
[link=https://github.com/asciidoctor/brand]
-image::test.svg[Asciidoctor Logo, 100]
+image::test.svg[Test, 100]


==== Not highlighted

@@ -2265,7 +2273,6 @@
video::test.mp4[width=300]

-
video::test.mp4[width=200, options=loop]

.Escaped
@@ -2653,15 +2660,18 @@
This section has trailing additional anchors.

+
====
[[id-1]][[id-2]]
Section L3
[[id-3]][[id-4]]

This section has both leading and trailing additional anchors.

+
==== Section L3
{title-attribute}
in Title


.Title {title-attribute}
This section has an attribute in its title.

+
[discrete]
== Discrete Section


@@ -2689,6 +2699,7 @@ === Section with escaped \*strong* text
////

+
= Another Section at Level 0



diff --git a/data/syntax/asciidoc.xml b/data/syntax/asciidoc.xml --- a/data/syntax/asciidoc.xml +++ b/data/syntax/asciidoc.xml @@ -43,7 +43,7 @@ ]> - + anchor @@ -165,9 +165,11 @@ + + @@ -201,13 +203,16 @@ + - + + +