// drop newline between [/list] and [*]
html = html.replace(/\[\/list\]\n\[\*\]/g, '[/list][*]');
- console.debug(html);
+
+ // drop newline between two [/list]
+ html = html.replace(/\[\/list\]\n\[\/list\]/g, '[/list][/list]');
+
// [table]
html = html.replace(/<table[^>]*>/gi, '[table]\n');
html = html.replace(/<\/table>/gi, '[/table]\n');
}
else {
var $height = $element.outerHeight() + (parseInt($element.css('margin-bottom'), 10) || 0);
- if ((event.pageY <= $offset.top + $height) || (index + 1) === $elements.length) {
+ if (event.pageY <= $offset.top + $height) {
$setCaretBeforeOrAfter(element, false);
return false;