in src/commonMain/kotlin/org/intellij/markdown/parser/constraints/CommonMarkdownConstraints.kt [164:185]
protected open fun fetchListMarker(pos: LookaheadText.Position): ListMarkerInfo? {
val c = pos.char
if (c == '*' || c == '-' || c == '+') {
return ListMarkerInfo(1, c, 1)
}
val line = pos.currentLine
var offset = pos.offsetInCurrentLine
while (offset < line.length && line[offset] in '0'..'9') {
offset++
}
return if (offset > pos.offsetInCurrentLine
&& offset - pos.offsetInCurrentLine <= 9
&& offset < line.length
&& (line[offset] == '.' || line[offset] == ')')) {
ListMarkerInfo(offset + 1 - pos.offsetInCurrentLine,
line[offset],
offset + 1 - pos.offsetInCurrentLine)
} else {
null
}
}