Fix section linking and editing

This commit is contained in:
2026-10-04 16:01:47 +02:00
parent 06da56d0a0
commit c456e35c76
3 changed files with 57 additions and 12 deletions
+1 -1
View File
@@ -91,7 +91,7 @@ func secionSpanEnd(sections [][]byte, start int) int {
if level == 0 {
return start + 1
}
for i := start + 1; i <= len(sections); i++ {
for i := start + 1; i < len(sections); i++ {
if l, _ := sectionHeading(sections[i]); l > 0 && l <= level {
return i
}