Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed #129. Footnotes now output valid HTML5.
As HTML5 has depreciated use of `rev=anything` and `rel=footnotes`, they are no longer inlcuded in the output when the output_format is set to HTML5. Note that if someone successful registers a spec for `rel=footnotes` in the future (as a microformat), then that could be considered valid. But until that happens, it is invlaid to use in HTML5. Therefore, we remove it from the output (when outputing HTML% only). As an alternative, two new classes are set (in all output_formats). On the link to the footnote (where `rel=footnotes` was used), we set `class=footnote-ref` and on the backlink (where `rev=footnote` was used), we set `class=footnote-backref`. Also updated the tests to reflect to the new classes in the output.
- Loading branch information
Waylan Limberg
committed
Aug 9, 2012
1 parent
b2939d1
commit 2fe5b5b
Showing
4 changed files
with
22 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
<p>This is the body with footnotes<sup id="fnref:foo"><a href="#fn:foo" rel="footnote">1</a></sup> | ||
that have named<sup id="fnref:bar"><a href="#fn:bar" rel="footnote">2</a></sup> markers and | ||
oddly<sup id="fnref:56"><a href="#fn:56" rel="footnote">3</a></sup> numbered<sup id="fnref:99"><a href="#fn:99" rel="footnote">4</a></sup> markers.</p> | ||
<p>This is the body with footnotes<sup id="fnref:foo"><a class="footnote-ref" href="#fn:foo" rel="footnote">1</a></sup> | ||
that have named<sup id="fnref:bar"><a class="footnote-ref" href="#fn:bar" rel="footnote">2</a></sup> markers and | ||
oddly<sup id="fnref:56"><a class="footnote-ref" href="#fn:56" rel="footnote">3</a></sup> numbered<sup id="fnref:99"><a class="footnote-ref" href="#fn:99" rel="footnote">4</a></sup> markers.</p> | ||
<div class="footnote"> | ||
<hr /> | ||
<ol> | ||
<li id="fn:foo"> | ||
<p>Footnote marked <code>foo</code>. <a href="#fnref:foo" rev="footnote" title="Jump back to footnote 1 in the text">↩</a></p> | ||
<p>Footnote marked <code>foo</code>. <a class="footnote-backref" href="#fnref:foo" rev="footnote" title="Jump back to footnote 1 in the text">↩</a></p> | ||
</li> | ||
<li id="fn:bar"> | ||
<p>This one is marked <em>bar</em>. <a href="#fnref:bar" rev="footnote" title="Jump back to footnote 2 in the text">↩</a></p> | ||
<p>This one is marked <em>bar</em>. <a class="footnote-backref" href="#fnref:bar" rev="footnote" title="Jump back to footnote 2 in the text">↩</a></p> | ||
</li> | ||
<li id="fn:56"> | ||
<p>A <strong>numbered</strong> footnote. <a href="#fnref:56" rev="footnote" title="Jump back to footnote 3 in the text">↩</a></p> | ||
<p>A <strong>numbered</strong> footnote. <a class="footnote-backref" href="#fnref:56" rev="footnote" title="Jump back to footnote 3 in the text">↩</a></p> | ||
</li> | ||
<li id="fn:99"> | ||
<p>The last one. <a href="#fnref:99" rev="footnote" title="Jump back to footnote 4 in the text">↩</a></p> | ||
<p>The last one. <a class="footnote-backref" href="#fnref:99" rev="footnote" title="Jump back to footnote 4 in the text">↩</a></p> | ||
</li> | ||
</ol> | ||
</div> |