You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the asciidoc.footnotes() function is called twice (such as if the reinstall
timer is triggered), then all footnoterefs are renumbered to 'undefined' and
broken. The attached patch solves this by only renumbering footnoterefs when a
valid number is found for them:
diff -r 7863b0a0ab0d -r 1dad4b041c4a javascripts/asciidoc.js
--- a/javascripts/asciidoc.js Wed Nov 27 21:59:21 2013 +1300
+++ b/javascripts/asciidoc.js Tue Apr 15 09:09:29 2014 -0600
@@ -156,9 +156,11 @@
var href = spans[i].getElementsByTagName("a")[0].getAttribute("href
href = href.match(/#.*/)[0]; // Because IE return full URL.
n = refs[href];
- spans[i].innerHTML =
- "[<a href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
+ if (n) {
+ spans[i].innerHTML =
+ "[<a href='#_footnote_" + n +
+ "' title='View footnote' class='footnote'>" + n + "</a>]";
+ }
}
}
}
Original issue reported on code.google.com by cristo...@gmail.com on 15 Apr 2014 at 3:39
Original issue reported on code.google.com by
cristo...@gmail.com
on 15 Apr 2014 at 3:39Attachments:
The text was updated successfully, but these errors were encountered: