Skip to content

Add syntax aware line joiner#55

Open
sidju wants to merge 1 commit into
Canop:mainfrom
sidju:main
Open

Add syntax aware line joiner#55
sidju wants to merge 1 commit into
Canop:mainfrom
sidju:main

Conversation

@sidju

@sidju sidju commented Nov 10, 2023

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

@sidju

sidju commented Nov 11, 2023

Copy link
Copy Markdown
Author

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 sidju marked this pull request as draft November 11, 2023 09:31
@sidju sidju force-pushed the main branch 2 times, most recently from 2ab62c0 to cef52d8 Compare November 11, 2023 16:23
@sidju

sidju commented Nov 11, 2023

Copy link
Copy Markdown
Author

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 sidju marked this pull request as ready for review November 11, 2023 16:25
@sidju sidju marked this pull request as draft November 11, 2023 16:29
@sidju

sidju commented Nov 11, 2023

Copy link
Copy Markdown
Author

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

- Uses recursive parsing to handle list entries and block quotes, the contents
  of which should be treated as markdown.
- Currently has a quirk of adding a trailing newline to the output.
@sidju sidju marked this pull request as ready for review November 11, 2023 16:41
@Canop

Canop commented Nov 11, 2023

Copy link
Copy Markdown
Owner

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.

@sidju

sidju commented Nov 11, 2023

Copy link
Copy Markdown
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants