| ... | ... | @@ -3319,14 +3319,16 @@ const NAV_MODES = { |
| 3319 | 3319 | } else if (line.text.startsWith("#")) { |
| 3320 | 3320 | line.type = "h1"; |
| 3321 | 3321 | line.text = line.text.substr(1); |
| 3322 | | } else if (line.text.startsWith("-")) { |
| 3323 | | line.type = "ul"; |
| 3324 | | line.text = line.text.substr(1); |
| 3325 | | } else if (line.text.match(/^\d+\..*$/)) { |
| 3326 | | // if line starts with {number}{dot} |
| 3327 | | const match = line.text.match(/(\d+)\./); |
| 3322 | } else if (line.text.match(/^-[ \t]+.*$/)) { |
| 3323 | // line starts with a hyphen, followed by spaces or tabs |
| 3324 | const match = line.text.match(/^-[ \t]+/); |
| 3328 | 3325 | line.type = "ul"; |
| 3329 | 3326 | line.text = line.text.substr(match[0].length); |
| 3327 | } else if (line.text.match(/^\d+\.[ \t]+.*$/)) { |
| 3328 | // line starts with {number}{dot}{spaces or tabs} |
| 3329 | const match = line.text.match(/(\d+)\.[ \t]+/); |
| 3330 | line.type = "ol"; |
| 3331 | line.text = line.text.substr(match[0].length); |
| 3330 | 3332 | line.ordered_number = Number(match[1].length); |
| 3331 | 3333 | } else if (line.text == "```") { |
| 3332 | 3334 | line.type = "skip"; |
| ... | ... | @@ -4067,4 +4069,4 @@ function toggleExpand(event) { |
| 4067 | 4069 | if (!parent.open && parent.getBoundingClientRect().top < 0) { |
| 4068 | 4070 | parent.parentElement.parentElement.scrollIntoView(true); |
| 4069 | 4071 | } |
| 4070 | | } |
| | \ No newline at end of file |
| 4072 | } |