You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: fill missing levels in heading sections calculation with 0
## Details
Previously when calculating sections for the following input:
```
## Notice
# Section A
### Note
# Section B
```
The results would be:
```
## Notice -> { 1 }
# Section A -> { 2 }
### Note -> { 2, 1 }
# Section B -> { 3 }
```
This change updates the calculation to always produce a number of
sections equal to the current heading level and to compute the nesting
level based off of sibling sections at the same level only. Any levels
that are skipped are filled in with 0s.
So now the results would be:
```
## Notice -> { 0, 1 }
# Section A -> { 1 }
### Note -> { 1, 0, 1 }
# Section B -> { 2 }
```
0 commit comments