+ raw = item; // Determine whether the next list item belongs here.
+ // Backpedal if it does not belong in this list.
+
+ if (i !== l - 1) {
+ bnext = this.rules.block.listItemStart.exec(itemMatch[i + 1]);
+
+ if (bnext[1].length > bcurr[0].length || bnext[1].length > 3) {
+ // nested list
+ itemMatch.splice(i, 2, itemMatch[i] + '\n' + itemMatch[i + 1]);
+ i--;
+ l--;
+ continue;
+ } else {
+ if ( // different bullet style
+ !this.options.pedantic || this.options.smartLists ? bnext[2][bnext[2].length - 1] !== bull[bull.length - 1] : isordered === (bnext[2].length === 1)) {
+ addBack = itemMatch.slice(i + 1).join('\n');
+ list.raw = list.raw.substring(0, list.raw.length - addBack.length);
+ i = l - 1;
+ }
+ }
+
+ bcurr = bnext;
+ } // Remove the list item's bullet