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

Check for wrong line-endings when getting xref #635

Merged
merged 2 commits into from
Aug 24, 2023

Conversation

GreyWyvern
Copy link
Contributor

If we didn't find the xref command at the offset specified, then replace Windows \r\n line endings with Unix style \n and try again. If it succeeds, then edit the line-endings and proceed as normal. Otherwise continue on to the decodeXrefStream() method.

Fixes parsing of existing test suite file /samples/bugs/Issue95_ANSI.pdf the unit test for which would normally be passed over because of the @group linux-only flag. Remove this flag, as all assertions in the testDecodeText() function now resolve as true in any environment.

If we didn't find the `xref` command at the offset specified, then replace Windows `\r\n` line endings with Unix style `\n` and try again. If it succeeds, then edit the line-endings and proceed as normal. Otherwise continue on to the `decodeXrefStream()` method.

Fixes parsing of existing test suite file **/samples/bugs/Issue95_ANSI.pdf** the test for which would normally be passed over because of the `@group linux-only` flag. Remove this flag, as all assertions in the `testDecodeText()` function now resolve as true in any environment.
@GreyWyvern
Copy link
Contributor Author

I would like to use Issue95_ANSI.pdf to create a few new assertions in testDecodeText() for my other PR #634. So if we can get this one merged first, that would be much appreciated! :)

Copy link
Collaborator

@k00ni k00ni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Is it ready to merge?

@GreyWyvern
Copy link
Contributor Author

Yes, all good. Thanks!

@k00ni k00ni merged commit 53538eb into smalot:master Aug 24, 2023
29 checks passed
@GreyWyvern GreyWyvern deleted the unix-xref branch August 24, 2023 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants