Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graceful handling of broken lists when cuddled-lists extra is enabled #578

Merged
merged 1 commit into from
May 27, 2024

Conversation

edufresne
Copy link

Fixes: #577

Overview

When "cuddled-lists" extra is passed, if you encounter ASCII art or any invalid list such as: - - - Test, an AssertionError is thrown due to the inability to parse it as a list and therefore the result text not containing the expected list structure.

Changes

  • Instead of throwing an assertion error, we simply treat the unparsed text as the paragraph text.
  • Added a regression test to reproduce the assertion error

@edufresne
Copy link
Author

@nicholasserra anything needed on my end? Not sure why the builds above are failing^

@nicholasserra
Copy link
Collaborator

Thanks! Probably a dependency issue with github actions, seems they removed 3.6 or something like that. Will check into it asap

@nicholasserra
Copy link
Collaborator

Sorry for the delay. Just fixed CI, if you do a upstream rebase this should be OK now.

@edufresne
Copy link
Author

Sorry for the delay. Just fixed CI, if you do a upstream rebase this should be OK now.

Awesome, thanks. Rebased. Once the workflow run is approved, should be good for a look if the build passes.

@nicholasserra
Copy link
Collaborator

LGTM thank you!

@nicholasserra nicholasserra merged commit 1518457 into trentm:master May 27, 2024
15 checks passed
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.

AssertionError: assert re.match(r'^<(?:ul|ol).*?>', cuddled_list) when two list items are on the same line
2 participants