diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-04-04 10:34:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-04 10:34:16 +0200 |
commit | 7410d259c2ab11de0b01e37a6561eec0c9d69aaf (patch) | |
tree | 51a3aceca5aa79fb4d069506757fe0d1ee29fa79 | |
parent | 13cee8c32fb941383e62ab1309904736e25c1b06 (diff) | |
parent | 3e817124fe58bf4dbe23fbc93062eb5d34382148 (diff) | |
download | pandoc-7410d259c2ab11de0b01e37a6561eec0c9d69aaf.tar.gz |
Merge pull request #3556 from nunull/issue1831_footnoteBackRefs
Add class to footnote back references
-rw-r--r-- | src/Text/Pandoc/Writers/HTML.hs | 2 | ||||
-rw-r--r-- | test/writer.html4 | 10 | ||||
-rw-r--r-- | test/writer.html5 | 10 |
3 files changed, 11 insertions, 11 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index 42726bc61..ef5e6b416 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -1047,7 +1047,7 @@ blockListToNote :: PandocMonad m => WriterOptions -> String -> [Block] -> StateT blockListToNote opts ref blocks = -- If last block is Para or Plain, include the backlink at the end of -- that block. Otherwise, insert a new Plain block with the backlink. - let backlink = [Link nullAttr [Str "↩"] ("#" ++ writerIdentifierPrefix opts ++ "fnref" ++ ref,[])] + let backlink = [Link ("",["footnoteBack"],[]) [Str "↩"] ("#" ++ writerIdentifierPrefix opts ++ "fnref" ++ ref,[])] blocks' = if null blocks then [] else let lastBlock = last blocks diff --git a/test/writer.html4 b/test/writer.html4 index 81cacde6a..ccd3af10c 100644 --- a/test/writer.html4 +++ b/test/writer.html4 @@ -535,14 +535,14 @@ Blah <div class="footnotes"> <hr /> <ol> -<li id="fn1"><p>Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document.<a href="#fnref1">↩</a></p></li> +<li id="fn1"><p>Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document.<a href="#fnref1" class="footnoteBack">↩</a></p></li> <li id="fn2"><p>Here’s the long note. This one contains multiple blocks.</p> <p>Subsequent blocks are indented to show that they belong to the footnote (as with list items).</p> <pre><code> { <code> }</code></pre> -<p>If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.<a href="#fnref2">↩</a></p></li> -<li id="fn3"><p>This is <em>easier</em> to type. Inline notes may contain <a href="http://google.com">links</a> and <code>]</code> verbatim characters, as well as [bracketed text].<a href="#fnref3">↩</a></p></li> -<li id="fn4"><p>In quote.<a href="#fnref4">↩</a></p></li> -<li id="fn5"><p>In list.<a href="#fnref5">↩</a></p></li> +<p>If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.<a href="#fnref2" class="footnoteBack">↩</a></p></li> +<li id="fn3"><p>This is <em>easier</em> to type. Inline notes may contain <a href="http://google.com">links</a> and <code>]</code> verbatim characters, as well as [bracketed text].<a href="#fnref3" class="footnoteBack">↩</a></p></li> +<li id="fn4"><p>In quote.<a href="#fnref4" class="footnoteBack">↩</a></p></li> +<li id="fn5"><p>In list.<a href="#fnref5" class="footnoteBack">↩</a></p></li> </ol> </div> </body> diff --git a/test/writer.html5 b/test/writer.html5 index 068628a69..f44de80e2 100644 --- a/test/writer.html5 +++ b/test/writer.html5 @@ -537,14 +537,14 @@ Blah <section class="footnotes"> <hr /> <ol> -<li id="fn1"><p>Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document.<a href="#fnref1">↩</a></p></li> +<li id="fn1"><p>Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document.<a href="#fnref1" class="footnoteBack">↩</a></p></li> <li id="fn2"><p>Here’s the long note. This one contains multiple blocks.</p> <p>Subsequent blocks are indented to show that they belong to the footnote (as with list items).</p> <pre><code> { <code> }</code></pre> -<p>If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.<a href="#fnref2">↩</a></p></li> -<li id="fn3"><p>This is <em>easier</em> to type. Inline notes may contain <a href="http://google.com">links</a> and <code>]</code> verbatim characters, as well as [bracketed text].<a href="#fnref3">↩</a></p></li> -<li id="fn4"><p>In quote.<a href="#fnref4">↩</a></p></li> -<li id="fn5"><p>In list.<a href="#fnref5">↩</a></p></li> +<p>If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.<a href="#fnref2" class="footnoteBack">↩</a></p></li> +<li id="fn3"><p>This is <em>easier</em> to type. Inline notes may contain <a href="http://google.com">links</a> and <code>]</code> verbatim characters, as well as [bracketed text].<a href="#fnref3" class="footnoteBack">↩</a></p></li> +<li id="fn4"><p>In quote.<a href="#fnref4" class="footnoteBack">↩</a></p></li> +<li id="fn5"><p>In list.<a href="#fnref5" class="footnoteBack">↩</a></p></li> </ol> </section> </body> |