maxg / handx

Markdown handouts + exercises
Other
2 stars 2 forks source link

Outline div incorrect when heading levels are out-of-order #31

Open maxg opened 5 years ago

maxg commented 5 years ago

When the first h3 appears before the first h2 (or, in theory, if the first h2 appeared before the first h1, which does not happen because the title is injected as a h1), its data-outline <div> encloses the rest of the handout.

Need to consume siblings only up to a heading that is the same or higher.