git.iko.soy/typeable/pandoc
on master help sign in
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

commite620eab478a29c34663572b83891f6855a4453c6 authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateThu 31 Dec 2009, 01:47 (17 years ago) parentc573551
2 files changed+24−24
src/Text/Pandoc/Writers/HTML.hs+4−4 tests/writer.html+20−20
src/Text/Pandoc/Writers/HTML.hs+4−4
@@ -492,10 +492,10 @@ inlineToHtml opts inline =
492492 htmlContents <- blockListToNote opts ref contents
493493 -- push contents onto front of notes
494494 put $ st {stNotes = (htmlContents:notes)}
495− return $ anchor ! [href ("#" ++ writerIdentifierPrefix opts ++ "fn" ++ ref),
496− theclass "footnoteRef",
497− prefixedId opts ("fnref" ++ ref)] <<
498− sup << ref
495+ return $ sup <<
496+ anchor ! [href ("#" ++ writerIdentifierPrefix opts ++ "fn" ++ ref),
497+ theclass "footnoteRef",
498+ prefixedId opts ("fnref" ++ ref)] << ref
499499 (Cite _ il) -> inlineListToHtml opts il
500500
501501blockListToNote :: WriterOptions -> String -> [Block] -> State WriterState Html
tests/writer.html+20−20
@@ -1168,35 +1168,35 @@ document.write('<a h'+'ref'+'="ma'+'ilto'+':'+e+'">'+'<code>'+e+'</code>'+'<\/'+
11681168><h1
11691169 >Footnotes</h1
11701170 ><p
1171− >Here is a footnote reference,<a href="#fn1" class="footnoteRef" id="fnref1"
1172− ><sup
1173− >1</sup
1174− ></a
1175− > and another.<a href="#fn2" class="footnoteRef" id="fnref2"
1176− ><sup
1177− >2</sup
1178− ></a
1171+ >Here is a footnote reference,<sup
1172+ ><a href="#fn1" class="footnoteRef" id="fnref1"
1173+ >1</a
1174+ ></sup
1175+ > and another.<sup
1176+ ><a href="#fn2" class="footnoteRef" id="fnref2"
1177+ >2</a
1178+ ></sup
11791179 > This should <em
11801180 >not</em
1181− > be a footnote reference, because it contains a space.[^my note] Here is an inline note.<a href="#fn3" class="footnoteRef" id="fnref3"
1182− ><sup
1183− >3</sup
1184− ></a
1181+ > be a footnote reference, because it contains a space.[^my note] Here is an inline note.<sup
1182+ ><a href="#fn3" class="footnoteRef" id="fnref3"
1183+ >3</a
1184+ ></sup
11851185 ></p
11861186 ><blockquote
11871187 ><p
1188− >Notes can go in quotes.<a href="#fn4" class="footnoteRef" id="fnref4"
1189− ><sup
1190− >4</sup
1191− ></a
1188+ >Notes can go in quotes.<sup
1189+ ><a href="#fn4" class="footnoteRef" id="fnref4"
1190+ >4</a
1191+ ></sup
11921192 ></p
11931193 ></blockquote
11941194 ><ol style="list-style-type: decimal;"
11951195 ><li
1196− >And in list items.<a href="#fn5" class="footnoteRef" id="fnref5"
1197− ><sup
1198− >5</sup
1199− ></a
1196+ >And in list items.<sup
1197+ ><a href="#fn5" class="footnoteRef" id="fnref5"
1198+ >5</a
1199+ ></sup
12001200 ></li
12011201 ></ol
12021202 ><p