From 7c15bc58501c64af4b217dab3fd774b2f50211f6 Mon Sep 17 00:00:00 2001 From: Krzysztof Kowalczyk Date: Mon, 26 Feb 2018 01:14:35 -0800 Subject: [PATCH] remove rel='footnote' which is not valid in html5 --- html/renderer.go | 2 +- inline_test.go | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/html/renderer.go b/html/renderer.go index a7e9d71..64c1ec5 100644 --- a/html/renderer.go +++ b/html/renderer.go @@ -323,7 +323,7 @@ func (r *Renderer) outTag(w io.Writer, name string, attrs []string) { func footnoteRef(prefix string, node *ast.Link) string { urlFrag := prefix + string(slugify(node.Destination)) nStr := strconv.Itoa(node.NoteID) - anchor := `` + nStr + `` + anchor := `` + nStr + `` return `` + anchor + `` } diff --git a/inline_test.go b/inline_test.go index b79e218..1886152 100644 --- a/inline_test.go +++ b/inline_test.go @@ -739,7 +739,7 @@ func TestAutoLink(t *testing.T) { var footnoteTests = []string{ "testing footnotes.[^a]\n\n[^a]: This is the note\n", - `

testing footnotes.1

+ `

testing footnotes.1

@@ -764,7 +764,7 @@ var footnoteTests = []string{ No longer in the footnote `, - `

testing long1 notes.

+ `

testing long1 notes.

No longer in the footnote

@@ -801,7 +801,7 @@ what happens here [note]: /link/c `, - `

testing1 multiple2 notes.

+ `

testing1 multiple2 notes.

omg

@@ -821,7 +821,7 @@ what happens here `, "testing inline^[this is the note] notes.\n", - `

testing inline1 notes.

+ `

testing inline1 notes.

@@ -835,7 +835,7 @@ what happens here `, "testing multiple[^1] types^[inline note] of notes[^2]\n\n[^2]: the second deferred note\n[^1]: the first deferred note\n\n\twhich happens to be a block\n", - `

testing multiple1 types2 of notes3

+ `

testing multiple1 types2 of notes3

@@ -860,7 +860,7 @@ what happens here may be multiple paragraphs. `, - `

This is a footnote12

+ `

This is a footnote12

@@ -878,13 +878,13 @@ what happens here `, "empty footnote[^]\n\n[^]: fn text", - "

empty footnote1

\n\n
\n\n
\n\n
    \n
  1. fn text
  2. \n
\n\n
\n", + "

empty footnote1

\n\n
\n\n
\n\n
    \n
  1. fn text
  2. \n
\n\n
\n", "Some text.[^note1]\n\n[^note1]: fn1", - "

Some text.1

\n\n
\n\n
\n\n
    \n
  1. fn1
  2. \n
\n\n
\n", + "

Some text.1

\n\n
\n\n
\n\n
    \n
  1. fn1
  2. \n
\n\n
\n", "Some text.[^note1][^note2]\n\n[^note1]: fn1\n[^note2]: fn2\n", - "

Some text.12

\n\n
\n\n
\n\n
    \n
  1. fn1
  2. \n\n
  3. fn2
  4. \n
\n\n
\n", + "

Some text.12

\n\n
\n\n
\n\n
    \n
  1. fn1
  2. \n\n
  3. fn2
  4. \n
\n\n
\n", `Bla bla [^1] [WWW][w3] @@ -892,7 +892,7 @@ what happens here [w3]: http://www.w3.org/ `, - `

Bla bla 1 WWW

+ `

Bla bla 1 WWW

@@ -909,7 +909,7 @@ what happens here [^fn1]: Fine print `, - `

This is exciting!1

+ `

This is exciting!1

@@ -973,14 +973,14 @@ func TestNestedFootnotes(t *testing.T) { [^fn2]: Obelisk`, - `

Paragraph.1

+ `

Paragraph.1


    -
  1. Asterisk2
  2. +
  3. Asterisk2
  4. Obelisk