diff options
| author | Shulhan <ms@kilabit.info> | 2022-10-20 04:48:20 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2022-10-20 22:09:31 +0700 |
| commit | 26c0d32b05eefb9b7040be69717d58e62bbdac2f (patch) | |
| tree | 86d02f3bd444b5148733cee1dca2756bff1c1f3a /testdata/inline_parser/macro_footnote_externalized_test.txt | |
| parent | dc6f1e2a3e720b706dbf945ae6b608199f630fb4 (diff) | |
| download | asciidoctor-go-26c0d32b05eefb9b7040be69717d58e62bbdac2f.tar.xz | |
all: implement macro "footnote:"
Macro footnote grammar,
----
"footnote:" [ REF_ID ] "[" STRING "]"
----
In asciidoctor, footnote can be placed anywhere, even after WORD without
space in between.
The REF_ID, define the unique ID for footnote and can be used to reference
the previous footnote.
The first footnote with REF_ID, should have the STRING defined.
The next footnote with the same REF_ID, should not have the STRING
defined; if its defined, the STRING is ignored.
Diffstat (limited to 'testdata/inline_parser/macro_footnote_externalized_test.txt')
| -rw-r--r-- | testdata/inline_parser/macro_footnote_externalized_test.txt | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/testdata/inline_parser/macro_footnote_externalized_test.txt b/testdata/inline_parser/macro_footnote_externalized_test.txt new file mode 100644 index 0000000..bd8736c --- /dev/null +++ b/testdata/inline_parser/macro_footnote_externalized_test.txt @@ -0,0 +1,56 @@ +>>> input.adoc +:fn-hail-and-rainbow: footnote:[The _double_ hail-and-rainbow level makes my toes tingle.] +:fn-disclaimer: footnote:disclaimer[Opinions are my own.] + +The hail-and-rainbow protocol can be initiated at five levels: + +. double{fn-hail-and-rainbow} +. tertiary +. supernumerary +. supermassive +. apocalyptic + +A bold statement!{fn-disclaimer} + +Another outrageous statement.{fn-disclaimer} + +<<< output.html + +<div class="paragraph"> +<p>The hail-and-rainbow protocol can be initiated at five levels:</p> +</div> +<div class="olist arabic"> +<ol class="arabic"> +<li> +<p>double<sup class="footnote">[<a id="_footnoteref_1" class="footnote" href="#_footnotedef_1" title="View footnote.">1</a>]</sup> +</p> +</li> +<li> +<p>tertiary</p> +</li> +<li> +<p>supernumerary</p> +</li> +<li> +<p>supermassive</p> +</li> +<li> +<p>apocalyptic</p> +</li> +</ol> +</div> +<div class="paragraph"> +<p>A bold statement!<sup class="footnote" id="_footnote_disclaimer">[<a id="_footnoteref_2" class="footnote" href="#_footnotedef_2" title="View footnote.">2</a>]</sup></p> +</div> +<div class="paragraph"> +<p>Another outrageous statement.<sup class="footnoteref">[<a class="footnote" href="#_footnotedef_2" title="View footnote.">2</a>]</sup></p> +</div> +<div id="footnotes"> +<hr> +<div class="footnote" id="_footnotedef_1"> +<a href="#_footnoteref_1">1</a>. The <em>double</em> hail-and-rainbow level makes my toes tingle. +</div> +<div class="footnote" id="_footnotedef_2"> +<a href="#_footnoteref_2">2</a>. Opinions are my own. +</div> +</div> |
