termimad icon indicating copy to clipboard operation
termimad copied to clipboard

Add syntax aware line joiner

Open sidju opened this issue 2 years ago • 5 comments

  • Avoids touching block quotes, as they would need recursive parsing.
  • Currently has a quirk of adding a trailing newline to the output.

sidju avatar Nov 10 '23 23:11 sidju

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).

sidju avatar Nov 11 '23 09:11 sidju

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.

sidju avatar Nov 11 '23 16:11 sidju

Has a panic causing bug. Gonna find and fix that real quick

sidju avatar Nov 11 '23 16:11 sidju

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.

Canop avatar Nov 11 '23 16:11 Canop

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.

sidju avatar Nov 11 '23 16:11 sidju