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 string formatting a float without explicit locale #86

Merged

Conversation

autumngray
Copy link
Contributor

Currently, the internal reader shows me all images as their html tags i.e. <img src=... yrel=...>. This is because of a localization bug when formatting and then later parsing yrel. I fixed this by explicitly using Locale.US, however I see that yrel isn't even used in the internal reader. Is it maybe better to simply remove it?

* Use explicit Locale.US in String.format,
* yrel is read back using toFloatOrNull(), which requires a decimal point.
@starry-shivam
Copy link
Member

however I see that yrel isn't even used in the internal reader. Is it maybe better to simply remove it?

I think yes, afaik it was supposed to tell position of images on the page, but we don't really use that method to parse images, so it should be safe to just remove it.

Copy link
Member

@starry-shivam starry-shivam left a comment

Choose a reason for hiding this comment

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

LGTM, merging this for now as I'm planning to do a new release soon, if you want feel free to create another PR to remove yrel entirely, or maybe I'll do it sometime later.

@starry-shivam starry-shivam merged commit 6fca390 into Pool-Of-Tears:main Oct 18, 2023
1 check 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.

2 participants