I’m looking for an option to sort markdown headings for rearranginc the TOC. For example if I have
# 1
## c
## a
## b
# 3
## e
## f
## d
# 2
## h
## g
## i
how can I sort alphabetically only H1 headers by name? Or only the H2 headers? Or reverse sort?
Apparently Microsoft Word is able to do this with macros, but I don’t use it and I never used macros so I don’t know if it’s even doable in LO. Is this something that can be achieved in LibreOffice?