aboutsummaryrefslogtreecommitdiff
path: root/element.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2022-10-20 04:48:20 +0700
committerShulhan <ms@kilabit.info>2022-10-20 22:09:31 +0700
commit26c0d32b05eefb9b7040be69717d58e62bbdac2f (patch)
tree86d02f3bd444b5148733cee1dca2756bff1c1f3a /element.go
parentdc6f1e2a3e720b706dbf945ae6b608199f630fb4 (diff)
downloadasciidoctor-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.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/element.go b/element.go
index a558055..1abba9e 100644
--- a/element.go
+++ b/element.go
@@ -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)