Open chrisjsewell opened 7 months ago
I've found from pandoc that people have very different expectations about this. Some people really want to be able to have nested sections with heading levels that skip. So I'm tempted to say: if you don't want this, don't write the djot headings this way.
It's also possible to write a filter that traverses the AST and "fixes" heading levels, or even inserts phantom sections.
But we can keep this open to see what others think about this issue. It would certainly be possible to insert a phantom section in this way.
From https://djot.net/playground/
If you have:
then the AST is
This maybe does not really make sense and could be problematic for a post-processor / writer
would it make sense to do something like generate "phantom" sections, e.g.