diff --git a/html/renderer.go b/html/renderer.go index 9e0d87a..d121763 100644 --- a/html/renderer.go +++ b/html/renderer.go @@ -857,9 +857,8 @@ func (r *Renderer) citation(w io.Writer, node *ast.Citation) { attr[0] = `class="suppressed"` } r.outTag(w, "") + r.outs(w, fmt.Sprintf(``, c)) + r.outs(w, "") } } diff --git a/parser/ref.go b/parser/ref.go index 414f02d..0b59a19 100644 --- a/parser/ref.go +++ b/parser/ref.go @@ -64,7 +64,7 @@ func maybeShortRefOrIndex(p *Parser, data []byte, offset int) (int, ast.Node) { idx := &ast.Index{} - idx.ID = fmt.Sprintf("idx-%d", p.indexCnt) + idx.ID = fmt.Sprintf("idxref:%d", p.indexCnt) p.indexCnt++ idx.Primary = data[start] == '!' diff --git a/testdata/mmark.test b/testdata/mmark.test index a2e2d66..ece7130 100644 --- a/testdata/mmark.test +++ b/testdata/mmark.test @@ -56,21 +56,21 @@ Caption: Shakespeare. +++

Test Citations

-

[RFC1034]

+

+++ # Test Multiple Citations [@RFC1034; @!RFC1035] +++

Test Multiple Citations

-

[RFC1034][RFC1035]

+

+++ # Test Multiple Citations with modifier [@-RFC1034] [@?RFC1035] +++

Test Multiple Citations with modifier

-

[RFC1034] [RFC1035]

+

+++ {.myclass1 .myclass2} ~~~ @@ -87,9 +87,9 @@ code +++

Index

-

- -

+

+ +

+++ # Cross ref Look at (#basics)