docs: function fixNumber(lineNumber, prevIndentLength, startIndex, cm) {
    let indent, delimiter, text, indentLength;
    let index = startIndex;
    let lineText = cm.getLine(lineNumber);
  
    do {
      [, indent, , , delimiter, text] = listRE.exec(lineText);
      indentLength = indent.length;
  
      if (indentLength === prevIndentLength) {
        // fix number
        cm.replaceRange(`${indent}${index}${delimiter}${text}`, {
          line: lineNumber,
          ch: 0
        }, {
          line: lineNumber,
          ch: lineText.length
        });
        index += 1;
        lineNumber += 1;
      } else if (indentLength > prevIndentLength) {
        // nested list start
        lineNumber = fixNumber(lineNumber, indentLength, 1, cm);
      } else {
        // nested list end
        return lineNumber;
      }
  
      lineText = cm.getLine(lineNumber);
    } while (listRE.test(lineText));
  
    return lineNumber;
  }