- From: Robin Berjon via cvs-syncmail <cvsmail@w3.org>
- Date: Fri, 04 Dec 2009 13:47:51 +0000
- To: public-dap-commits@w3.org
Update of /sources/public/2009/dap/ReSpec.js/js In directory hutz:/tmp/cvs-serv9007/js Modified Files: respec.js Log Message: remove <dfn> from toc titles, silly Index: respec.js =================================================================== RCS file: /sources/public/2009/dap/ReSpec.js/js/respec.js,v retrieving revision 1.61 retrieving revision 1.62 diff -u -d -r1.61 -r1.62 --- respec.js 3 Dec 2009 13:50:05 -0000 1.61 +++ respec.js 4 Dec 2009 13:47:49 -0000 1.62 @@ -522,14 +522,21 @@ for (var j = 0; j < h.childNodes.length; j++) { var node = h.childNodes[j].cloneNode(true); hKids.appendChild(node); - if (node.nodeType == Node.ELEMENT_NODE && node.localName.toLowerCase() == "a") { - node = sn.renameEl(node, "span"); - var cl = node.getAttribute("class"); - if (!cl) cl = ""; - else cl = " " + cl; - // node.setAttribute("class", "formerLink" + cl); - sn.addClass(node, "formerLink" + cl); - node.removeAttribute("href"); + if (node.nodeType == Node.ELEMENT_NODE) { + var ln = node.localName.toLowerCase(); + if (ln == "a") { + node = sn.renameEl(node, "span"); + var cl = node.getAttribute("class"); + if (!cl) cl = ""; + else cl = " " + cl; + // node.setAttribute("class", "formerLink" + cl); + sn.addClass(node, "formerLink" + cl); + node.removeAttribute("href"); + } + else if (ln == "dfn") { + node = sn.renameEl(node, "span"); + node.removeAttribute("id"); + } } } var id = sn.makeID(sec, null, title);
Received on Friday, 4 December 2009 13:48:00 UTC