1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 09:48:00 +01:00

Fix completion preview error in 3.6a2

--HG--
extra : rebase_source : 33da194d4dc35758f42183b0969132289d9594cc
This commit is contained in:
Kris Maglione
2009-10-24 05:49:45 -04:00
parent 3651a0a403
commit 2add32c3f2
3 changed files with 35 additions and 13 deletions

View File

@@ -474,15 +474,22 @@ const util = { //{{{
return ns + ":" + node.localName;
return node.localName.toLowerCase();
}
let tag = "<" + [namespaced(elem)].concat(
[namespaced(a) + "=" + template.highlight(a.value, true)
for ([i, a] in util.Array.iteritems(elem.attributes))]).join(" ");
try
{
let tag = "<" + [namespaced(elem)].concat(
[namespaced(a) + "=" + template.highlight(a.value, true)
for ([i, a] in util.Array.iteritems(elem.attributes))]).join(" ");
if (!elem.firstChild || /^\s*$/.test(elem.firstChild) && !elem.firstChild.nextSibling)
tag += '/>';
else
tag += '>...</' + namespaced(elem) + '>';
return tag;
if (!elem.firstChild || /^\s*$/.test(elem.firstChild) && !elem.firstChild.nextSibling)
tag += '/>';
else
tag += '>...</' + namespaced(elem) + '>';
return tag;
}
catch (e)
{
return {}.toString.call(elem);
}
}
try