Add syntax aware line joiner
- Avoids touching block quotes, as they would need recursive parsing.
- Currently has a quirk of adding a trailing newline to the output.
I've realized that the current handling for lists isn't correct. To add another line of text in a list entry the text should be indented (syntax says 4 spaces or tab, convention says 2 spaces). As such I'll add another commit that handles that (and preserves the indentation while joining).
Should be complete now. Looks a bit bad though, so you might be better of doing a rewrite based on it than using it as is.
Has a panic causing bug. Gonna find and fix that real quick
Just a note: I'll definitely have a look at this PR, but it may take a while, I have a huge backlog of issues to solve.
No worries. I have my workaround set up and working, it just feels stupid to write this bloody syntax aware line joiner and not share it where others would need it.