Skip to content
This repository

HTML5 Compatibility for Footnotes #4

Merged
merged 1 commit into from over 2 years ago

3 participants

Joe Fiorini Brad Weslake Thomas Leitner
Joe Fiorini

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!

Brad Weslake

Looks good to me.

Joe Fiorini

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!

Thomas Leitner gettalong merged commit b3b2ebc into from December 11, 2011
Thomas Leitner gettalong closed this December 11, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

May 11, 2011
Replace rev attribute for HTML5 compatibility ef70112
This page is out of date. Refresh to see the latest.
2  lib/kramdown/converter/html.rb
@@ -393,7 +393,7 @@ def footnote_content
393 393
           li.children = Marshal.load(Marshal.dump(data.children))
394 394
           ol.children << li
395 395
 
396  
-          ref = Element.new(:raw, "<a href=\"#fnref:#{name}\" rev=\"footnote\">&#8617;</a>")
  396
+          ref = Element.new(:raw, "<a href=\"#fnref:#{name}\" rel=\"reference\">&#8617;</a>")
397 397
           if li.children.last.type == :p
398 398
             para = li.children.last
399 399
           else
4  test/testcases/span/04_footnote/footnote_nr.html
@@ -3,10 +3,10 @@
3 3
 <div class="footnotes">
4 4
   <ol start="35">
5 5
     <li id="fn:ab">
6  
-      <p>Some text.<a href="#fnref:ab" rev="footnote">&#8617;</a></p>
  6
+      <p>Some text.<a href="#fnref:ab" rel="reference">&#8617;</a></p>
7 7
     </li>
8 8
     <li id="fn:bc">
9  
-      <p>Some other text.<a href="#fnref:bc" rev="footnote">&#8617;</a></p>
  9
+      <p>Some other text.<a href="#fnref:bc" rel="reference">&#8617;</a></p>
10 10
     </li>
11 11
   </ol>
12 12
 </div>
10  test/testcases/span/04_footnote/markers.html
@@ -17,7 +17,7 @@
17 17
 <div class="footnotes">
18 18
   <ol>
19 19
     <li id="fn:fn">
20  
-      <p>Some foot note text<a href="#fnref:fn" rev="footnote">&#8617;</a></p>
  20
+      <p>Some foot note text<a href="#fnref:fn" rel="reference">&#8617;</a></p>
21 21
     </li>
22 22
     <li id="fn:3">
23 23
       <p>other text
@@ -26,21 +26,21 @@
26 26
       <blockquote>
27 27
         <p>and a quote</p>
28 28
       </blockquote>
29  
-      <p><a href="#fnref:3" rev="footnote">&#8617;</a></p>
  29
+      <p><a href="#fnref:3" rel="reference">&#8617;</a></p>
30 30
     </li>
31 31
     <li id="fn:1">
32  
-      <p>some <em>text</em><a href="#fnref:1" rev="footnote">&#8617;</a></p>
  32
+      <p>some <em>text</em><a href="#fnref:1" rel="reference">&#8617;</a></p>
33 33
     </li>
34 34
     <li id="fn:now">
35 35
 
36 36
       <pre><code>code block
37 37
 continued here
38 38
 </code></pre>
39  
-      <p><a href="#fnref:now" rev="footnote">&#8617;</a></p>
  39
+      <p><a href="#fnref:now" rel="reference">&#8617;</a></p>
40 40
     </li>
41 41
     <li id="fn:empty">
42 42
 
43  
-      <p><a href="#fnref:empty" rev="footnote">&#8617;</a></p>
  43
+      <p><a href="#fnref:empty" rel="reference">&#8617;</a></p>
44 44
     </li>
45 45
   </ol>
46 46
 </div>
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.