index.js
function fixNestedLists (body, indent) {
  var regex = new RegExp('' +
    '(\\S(?: |  )?)' + // Last char of current point, plus one or two spaces
                       // to allow trailing spaces
    '((?:' + indent + ')+)' + // Indentation of sub point
    '(' + POINT_REGEX + '(?:.*)+)$', 'gm'); // Body of subpoint
  return body.replace(regex, '$1\n' + indent + '$2$3');
}
function fixNestedLists (body, indent) {
  var regex = new RegExp('' +
    '(\\S(?: |  )?)' + // Last char of current point, plus one or two spaces
                       // to allow trailing spaces
    '((?:' + indent + ')+)' + // Indentation of sub point
    '(' + POINT_REGEX + '(?:.*)+)$', 'gm'); // Body of subpoint
  return body.replace(regex, '$1\n' + indent + '$2$3');
}
function fixNestedLists ( body , indent ) { var regex = new RegExp ( '' + '(\\S(?: |  )?)' + // Last char of current point, plus one or two spaces // to allow trailing spaces '((?:' + indent + ')+)' + // Indentation of sub point '(' + POINT_REGEX + '(?:.*)+)$' , 'gm' ) ; // Body of subpoint return body . replace ( regex , '$1\n' + indent + '$2$3' ) ; }
Prevents nested lists from joining their parent list's last line
Prevents nested lists from joining their parent list s last line