From 461f09665a6a9be7700237f6b458b65ca38061d5 Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Thu, 31 Mar 2011 00:35:44 +0200 Subject: Fix order of covering elements in createDeadLink. --- data/lib/util.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'data') diff --git a/data/lib/util.js b/data/lib/util.js index 611d353..6256171 100644 --- a/data/lib/util.js +++ b/data/lib/util.js @@ -140,10 +140,10 @@ function createDeadLink (id, text, parent, callback, params, before, covered, ac locParent.appendChild(newAElem); if ((before === "br") || (before === true)) { - locParent.appendChild(document.createElement("br")); + locParent.insertBefore(document.createElement("br"), newAElem); } else if (before === "dash") { - locParent.appendChild(document.createTextNode("\u00A0-\u00A0")); + locParent.insertBefore(document.createTextNode("\u00A0-\u00A0"), newAElem); } else if (before === "parens") { locParent.appendChild(document.createTextNode(")")); -- cgit