var tbody = DOMTraverse.childByTag(element, 'TBODY');
var innerHtml = (tbody === null) ? element.innerHTML : tbody.innerHTML;
- element.outerHTML = '\n[table]' + innerHtml + '\n[/table]';
+ element.outerHTML = '\n[table]' + innerHtml + '\n[/table]\n';
},
_convertUrl: function(element) {
stack[index + 1] = tmp.replace(/^\n/, '');
}
- if (stack.length < item.pair + 1) {
+ if (stack.length > item.pair + 1) {
tmp = stack[item.pair + 1];
if (typeof tmp === 'string') {
stack[item.pair + 1] = tmp.replace(/^\n/, '');