code: function skipOrderedListMarker(state, startLine) {
    var ch,
        start = state.bMarks[startLine] + state.tShift[startLine],
        pos = start,
        max = state.eMarks[startLine];
  
    // List marker should have at least 2 chars (digit + dot)
    if (pos + 1 >= max) { return -1; }
  
    ch = state.src.charCodeAt(pos++);
  
    if (ch < 0x30/* 0 */ || ch > 0x39/* 9 */) { return -1; }
  
    for (;;) {
      // EOL -> fail
      if (pos >= max) { return -1; }
  
      ch = state.src.charCodeAt(pos++);
  
      if (ch >= 0x30/* 0 */ && ch <= 0x39/* 9 */) {
  
        // List marker should have no more than 9 digits
        // (prevents integer overflow in browsers)
        if (pos - start >= 10) { return -1; }
  
        continue;
      }
  
      // found valid marker
      if (ch === 0x29/* ) */ || ch === 0x2e/* . */) {
        break;
      }
  
      return -1;
    }
  
  
    if (pos < max) {
      ch = state.src.charCodeAt(pos);
  
      if (!isSpace(ch)) {
        // " 1.test " - is not a list item
        return -1;
      }
    }
    return pos;
  }
docs: Search `\d+[.)][\n ]`, returns next pos after marker on success or -1 on fail.