Skip to content

markdown.xml: Close nested sub-headers fold regions when parent header is closed

Jan Paul Batrina requested to merge work/markdown-nested-header-folds into master

e.g.

# H1
## H2
### H3
# H1 <-- All headers above should end here

This is currently done using a hack, visible to users since part of the next header is included in the previous region (e.g. [### H3\n# H]1 is how the region above will be marked).

In the future, a better solution would be to provide a mechanism to close multiple folding regions with a single rule.

BUG: 441278

Before:

kate-subheaders-fold-incorrect

After:

kate-subheaders-fold

Edited by Jan Paul Batrina

Merge request reports