Hi,

I noticed that since version 8.6.6, I have duplicated entries in TOC
of large document. There's an example in WeeChat API doc here:
http://weechat.org/files/doc/devel/weechat_plugin_api.en.html
(tested with Firefox 8 and 9, other browsers may not have same
problem).

I noticed that problem was introduced by a patch, which was supposed
to fix... this same problem!
The patch was this one:
http://code.google.com/p/asciidoc/source/detail?r=2a21e2f6c06f7d4ffd87ec164425e6348e4cc826

In fact for my document, version without patch was just working fine.
So I made a compromise between both, and use toLowerCase() in
javascript to make case-insensitive comparison.
With attached patch, it works for my document. I hope it will fix
problem for everyone (I didn't test on other documents).

-- 
Cordialement / Best regards
Sébastien.

-- 
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/asciidoc?hl=en.

diff -r 65138214d74f javascripts/asciidoc.js
--- a/javascripts/asciidoc.js	Fri Dec 16 17:40:14 2011 +1300
+++ b/javascripts/asciidoc.js	Sat Dec 17 13:53:37 2011 +0100
@@ -68,7 +68,7 @@
   var i;
   for (i = 0; i < toc.childNodes.length; i++) {
     var entry = toc.childNodes[i];
-    if (entry.nodeName == 'div'
+    if (entry.nodeName.toLowerCase() == 'div'
      && entry.getAttribute("class")
      && entry.getAttribute("class").match(/^toclevel/))
       tocEntriesToRemove.push(entry);
@@ -114,7 +114,7 @@
   var entriesToRemove = [];
   for (i = 0; i < noteholder.childNodes.length; i++) {
     var entry = noteholder.childNodes[i];
-    if (entry.nodeName == 'div' && entry.getAttribute("class") == "footnote")
+    if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
       entriesToRemove.push(entry);
   }
   for (i = 0; i < entriesToRemove.length; i++) {

Reply via email to