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

fix: parse keywords that end code stream #885

Merged

Conversation

qued
Copy link
Contributor

@qued qued commented May 4, 2023

Pull request

Closes 884. A small change so that if no keyword-terminating-pattern is found before the stream is exhausted, the keyword is considered terminated and sent for parsing.

How Has This Been Tested?

Included test that fails before change and succeeds after change. Also see attached document in linked issue for a PDF that is not parsed correctly before the change and is parsed correctly after.

Checklist

  • I have read CONTRIBUTING.md.
  • I have added a concise human-readable description of the change to CHANGELOG.md.
  • I have tested that this fix is effective or that this feature works.
  • I have added docstrings to newly created methods and classes.
  • I have updated the README.md and the readthedocs documentation. Or verified that this is not necessary.

@pietermarsman
Copy link
Member

I flipped the if-else for readability and simplified the test. Ready for merging now.

Thanks for your time and contribution!

@pietermarsman pietermarsman added this pull request to the merge queue Dec 31, 2023
Merged via the queue into pdfminer:master with commit 95b9f55 Dec 31, 2023
9 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.

Keywords that end a code stream are ignored.
2 participants