- reference.detach();
- } else if(precedingItems.length > 0 && succeedingItems.length === 0) {
- extractedItems.forEach(function(item) {
- reference.after(item);
- if(!listIsNested)
- item.setWlxmlClass(null);
- });
- } else if(precedingItems.length === 0 && succeedingItems.length > 0) {
+ if(precedingItems.length === 0)
+ reference_orig.detach();
+ } else if(precedingItems.length === 0) {