aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2009-12-31 01:47:08 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2009-12-31 01:47:08 +0000
commite620eab478a29c34663572b83891f6855a4453c6 (patch)
tree086d294418ee475b08afe331f377415b484e5df4
parentc5735511eb9a991b1907c8eaa7373d68270978eb (diff)
downloadpandoc-e620eab478a29c34663572b83891f6855a4453c6.tar.gz
HTML footnotes: put anchor inside sup, instead of other way.
Resolves Issue #191. Thanks to infinity0x for suggesting. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1743 788f1e2b-df1e-0410-8736-df70ead52e1b
-rw-r--r--src/Text/Pandoc/Writers/HTML.hs8
-rw-r--r--tests/writer.html40
2 files changed, 24 insertions, 24 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs
index a5b403a9b..cb8bd35d3 100644
--- a/src/Text/Pandoc/Writers/HTML.hs
+++ b/src/Text/Pandoc/Writers/HTML.hs
@@ -492,10 +492,10 @@ inlineToHtml opts inline =
htmlContents <- blockListToNote opts ref contents
-- push contents onto front of notes
put $ st {stNotes = (htmlContents:notes)}
- return $ anchor ! [href ("#" ++ writerIdentifierPrefix opts ++ "fn" ++ ref),
- theclass "footnoteRef",
- prefixedId opts ("fnref" ++ ref)] <<
- sup << ref
+ return $ sup <<
+ anchor ! [href ("#" ++ writerIdentifierPrefix opts ++ "fn" ++ ref),
+ theclass "footnoteRef",
+ prefixedId opts ("fnref" ++ ref)] << ref
(Cite _ il) -> inlineListToHtml opts il
blockListToNote :: WriterOptions -> String -> [Block] -> State WriterState Html
diff --git a/tests/writer.html b/tests/writer.html
index c6f31b107..9ddf5c70c 100644
--- a/tests/writer.html
+++ b/tests/writer.html
@@ -1168,35 +1168,35 @@ document.write('<a h'+'ref'+'="ma'+'ilto'+':'+e+'">'+'<code>'+e+'</code>'+'<\/'+
><h1
>Footnotes</h1
><p
- >Here is a footnote reference,<a href="#fn1" class="footnoteRef" id="fnref1"
- ><sup
- >1</sup
- ></a
- > and another.<a href="#fn2" class="footnoteRef" id="fnref2"
- ><sup
- >2</sup
- ></a
+ >Here is a footnote reference,<sup
+ ><a href="#fn1" class="footnoteRef" id="fnref1"
+ >1</a
+ ></sup
+ > and another.<sup
+ ><a href="#fn2" class="footnoteRef" id="fnref2"
+ >2</a
+ ></sup
> This should <em
>not</em
- > be a footnote reference, because it contains a space.[^my note] Here is an inline note.<a href="#fn3" class="footnoteRef" id="fnref3"
- ><sup
- >3</sup
- ></a
+ > be a footnote reference, because it contains a space.[^my note] Here is an inline note.<sup
+ ><a href="#fn3" class="footnoteRef" id="fnref3"
+ >3</a
+ ></sup
></p
><blockquote
><p
- >Notes can go in quotes.<a href="#fn4" class="footnoteRef" id="fnref4"
- ><sup
- >4</sup
- ></a
+ >Notes can go in quotes.<sup
+ ><a href="#fn4" class="footnoteRef" id="fnref4"
+ >4</a
+ ></sup
></p
></blockquote
><ol style="list-style-type: decimal;"
><li
- >And in list items.<a href="#fn5" class="footnoteRef" id="fnref5"
- ><sup
- >5</sup
- ></a
+ >And in list items.<sup
+ ><a href="#fn5" class="footnoteRef" id="fnref5"
+ >5</a
+ ></sup
></li
></ol
><p