| 150 |
tagName = v.toLowerCase (); |
tagName = v.toLowerCase (); |
| 151 |
return ''; |
return ''; |
| 152 |
}); |
}); |
| 153 |
e = e.replace (/^\s*([^\s=]+)\s*(?:=\s*(?:"([^"]*)"|'([^']*)'|([^"']+)))?/, |
while (true) { |
| 154 |
function (x, attrName, attrValue1, attrValue2, attrValue3) { |
var m = false; |
| 155 |
v = attrValue1 || attrValue2 || attrValue3; |
e = e.replace (/^\s*([^\s=]+)\s*(?:=\s*(?:"([^"]*)"|'([^']*)'|([^"'\s]*)))?/, |
| 156 |
v = v.replace (/"/g, '"').replace (/'/g, "'") |
function (x, attrName, attrValue1, attrValue2, attrValue3) { |
| 157 |
.replace (/&/g, '&'); |
v = attrValue1 || attrValue2 || attrValue3; |
| 158 |
attrs[attrName.toLowerCase ()] = v; |
v = v.replace (/"/g, '"').replace (/'/g, "'") |
| 159 |
return ''; |
.replace (/&/g, '&'); |
| 160 |
}); |
attrs[attrName.toLowerCase ()] = v; |
| 161 |
|
m = true; |
| 162 |
|
return ''; |
| 163 |
|
}); |
| 164 |
|
if (!m) break; |
| 165 |
|
} |
| 166 |
if (e.length) { |
if (e.length) { |
| 167 |
log ('Broken start tag: "' + e + '"'); |
log ('Broken start tag: "' + e + '"'); |
| 168 |
} |
} |
| 649 |
r += '| ' + indent + node.localName + '\n'; |
r += '| ' + indent + node.localName + '\n'; |
| 650 |
if (node.async) r += '| ' + indent + ' async=""\n'; |
if (node.async) r += '| ' + indent + ' async=""\n'; |
| 651 |
if (node.defer) r += '| ' + indent + ' defer=""\n'; |
if (node.defer) r += '| ' + indent + ' defer=""\n'; |
| 652 |
if (node.src) r += '| ' + indent + ' src="' + node.src + '"\n'; |
if (node.src != null) { |
| 653 |
|
r += '| ' + indent + ' src="' + node.src + '"\n'; |
| 654 |
|
} |
| 655 |
r += dumpTree (node, indent + ' '); |
r += dumpTree (node, indent + ' '); |
| 656 |
} else if (node instanceof JSText) { |
} else if (node instanceof JSText) { |
| 657 |
r += '| ' + indent + '"' + node.data + '"\n'; |
r += '| ' + indent + '"' + node.data + '"\n'; |
| 739 |
<p>For some reason, this parser does not work in browsers that do |
<p>For some reason, this parser does not work in browsers that do |
| 740 |
not support JavaScript 1.5. |
not support JavaScript 1.5. |
| 741 |
|
|
|
<!-- TODO: multiple attributes are not supported yet --> |
|
|
|
|
| 742 |
</body> |
</body> |
| 743 |
</html> |
</html> |