From 338ca359c1681847a2cde5192ac8952b8d7b51dd Mon Sep 17 00:00:00 2001 From: Iain Haslam Date: Fri, 16 Feb 2018 22:21:04 +0000 Subject: [PATCH] Fix HTML5 by removing rel="footnote" which is invalid. Resolves #336. --- html.go | 2 +- inline_test.go | 44 ++++++++++++++++++++++---------------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/html.go b/html.go index 2f0ad3b..c917c7d 100644 --- a/html.go +++ b/html.go @@ -620,7 +620,7 @@ func (options *Html) FootnoteRef(out *bytes.Buffer, ref []byte, id int) { out.WriteString(`fnref:`) out.WriteString(options.parameters.FootnoteAnchorPrefix) out.Write(slug) - out.WriteString(`">testing footnotes.1

+ `

testing footnotes.1


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

testing long1 notes.

+ `

testing long1 notes.

No longer in the footnote

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

testing1 multiple2 notes.

+ `

testing1 multiple2 notes.

omg

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

testing inline1 notes.

+ `

testing inline1 notes.


@@ -944,7 +944,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


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

This is a footnote12

+ `

This is a footnote12


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

empty footnote1

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

empty footnote1

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

Some text.1

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

Some text.1

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

Some text.12

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

Some text.12

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

Bla bla 1 WWW

+ `

Bla bla 1 WWW


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

This is exciting!1

+ `

This is exciting!1


@@ -1031,17 +1031,17 @@ test footnotes the second.[^b] [^a]: This is the first note[^a]. [^b]: this is the second note.[^a] `, - `

testing footnotes.1

+ `

testing footnotes.1

-

test footnotes the second.2

+

test footnotes the second.2


    -
  1. This is the first note1. +
  2. This is the first note1.
  3. -
  4. this is the second note.1 +
  5. this is the second note.1
@@ -1086,13 +1086,13 @@ func TestNestedFootnotes(t *testing.T) { [^fn2]: Obelisk`, - `

Paragraph.1

+ `

Paragraph.1


    -
  1. Asterisk2 +
  2. Asterisk2
  3. Obelisk
  4. @@ -1110,19 +1110,19 @@ This uses footnote C.[^C] [^C]: C note, uses B.[^B] `, - `

    This uses footnote A.1

    + `

    This uses footnote A.1

    -

    This uses footnote C.2

    +

    This uses footnote C.2


      -
    1. A note. use itself.1 +
    2. A note. use itself.1
    3. -
    4. C note, uses B.3 +
    5. C note, uses B.3
    6. -
    7. B note, uses A to test duplicate.1 +
    8. B note, uses A to test duplicate.1