Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

HTML5 Compatibility for Footnotes #4

Merged
merged 1 commit into from

3 participants

@joefiorini

The link that renders with footnotes to jump back to the main content uses the "rev" attribute, which has been removed in HTML5 (see http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=html5+rev+attribute). The recommendation is to use the "rel" attribute with a name meaning the opposite of it's partner "rel" attribute. Therefore, since the footnote link has rel="footnote" I changed the return link to rel="reference". Can you think of a better value for this?

Thanks!

@etc

Looks good to me.

@joefiorini

Just noticed this has been sitting open for awhile. Can someone please either accept it or close it so I can update from my fork? Thank you!

@gettalong gettalong merged commit b3b2ebc into gettalong:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 11, 2011
  1. Replace rev attribute for HTML5 compatibility

    Joe Fiorini authored
This page is out of date. Refresh to see the latest.
View
2  lib/kramdown/converter/html.rb
@@ -393,7 +393,7 @@ def footnote_content
li.children = Marshal.load(Marshal.dump(data.children))
ol.children << li
- ref = Element.new(:raw, "<a href=\"#fnref:#{name}\" rev=\"footnote\">&#8617;</a>")
+ ref = Element.new(:raw, "<a href=\"#fnref:#{name}\" rel=\"reference\">&#8617;</a>")
if li.children.last.type == :p
para = li.children.last
else
View
4 test/testcases/span/04_footnote/footnote_nr.html
@@ -3,10 +3,10 @@
<div class="footnotes">
<ol start="35">
<li id="fn:ab">
- <p>Some text.<a href="#fnref:ab" rev="footnote">&#8617;</a></p>
+ <p>Some text.<a href="#fnref:ab" rel="reference">&#8617;</a></p>
</li>
<li id="fn:bc">
- <p>Some other text.<a href="#fnref:bc" rev="footnote">&#8617;</a></p>
+ <p>Some other text.<a href="#fnref:bc" rel="reference">&#8617;</a></p>
</li>
</ol>
</div>
View
10 test/testcases/span/04_footnote/markers.html
@@ -17,7 +17,7 @@
<div class="footnotes">
<ol>
<li id="fn:fn">
- <p>Some foot note text<a href="#fnref:fn" rev="footnote">&#8617;</a></p>
+ <p>Some foot note text<a href="#fnref:fn" rel="reference">&#8617;</a></p>
</li>
<li id="fn:3">
<p>other text
@@ -26,21 +26,21 @@
<blockquote>
<p>and a quote</p>
</blockquote>
- <p><a href="#fnref:3" rev="footnote">&#8617;</a></p>
+ <p><a href="#fnref:3" rel="reference">&#8617;</a></p>
</li>
<li id="fn:1">
- <p>some <em>text</em><a href="#fnref:1" rev="footnote">&#8617;</a></p>
+ <p>some <em>text</em><a href="#fnref:1" rel="reference">&#8617;</a></p>
</li>
<li id="fn:now">
<pre><code>code block
continued here
</code></pre>
- <p><a href="#fnref:now" rev="footnote">&#8617;</a></p>
+ <p><a href="#fnref:now" rel="reference">&#8617;</a></p>
</li>
<li id="fn:empty">
- <p><a href="#fnref:empty" rev="footnote">&#8617;</a></p>
+ <p><a href="#fnref:empty" rel="reference">&#8617;</a></p>
</li>
</ol>
</div>
Something went wrong with that request. Please try again.