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 /element.go | |
| 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 'element.go')
| -rw-r--r-- | element.go | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -831,6 +831,9 @@ func (el *element) toHTML(doc *Document, w io.Writer) { } fmt.Fprintf(w, `<a href="#%s">%s</a>`, href, label) + case elKindFootnote: + htmlWriteFootnote(el, w) + case elKindMacroTOC: if doc.tocIsEnabled && doc.tocPosition == metaValueMacro { doc.tocHTML(w) |
