var p = list.after({tagName: 'div', attrs: {'class': 'p'}});
p.append({text: ''});
item.detach();
+ if(list.contents().length === 0) {
+ list.detach();
+ }
return p;
}, {
success: function(p) {
result = s.element.wlxmlNode.insertNewNode();
}, {
metadata: {
- description: gettext('Splitting node'),
+ description: gettext('Inserting node'),
fragment: s.toDocumentFragment()
}
});