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 the parsing error of Issue #2029 #2052

Merged
merged 4 commits into from
May 1, 2024
Merged

Fix the parsing error of Issue #2029 #2052

merged 4 commits into from
May 1, 2024

Conversation

LukasHuth
Copy link
Contributor

@LukasHuth LukasHuth commented Apr 30, 2024

Describe your changes

I changed the replace from , -> . to , -> nothing, because the stat got interpreted as a float and in a later step rounded down to 1

Issue or discord link

Testing/validation

Checklist before requesting a review (leave this PR as draft if any part of this list is not done.)

  • I have commented my code in hard-to understand areas.
  • I have made corresponding changes to README or wiki.
  • For front-end changes, I have updated the corresponding English translations.
  • I have run yarn run mini-ci locally to validate format and lint.
  • If I have added a new library or app, I have updated the deployment scripts to ignore changes as needed

I changed the replace from , -> . to , -> nothing, because the stat got
interpreted as a float and in a later step rounded down to 1
Copy link
Contributor

github-actions bot commented Apr 30, 2024

[frontend] [Tue Apr 30 15:06:53 UTC 2024] - Deployed 0927c02 to https://genshin-optimizer-prs.github.io/pr/2052/frontend (Takes 3-5 minutes after this completes to be available)

[frontend] [Tue Apr 30 19:04:44 UTC 2024] - Deployed fccd490 to https://genshin-optimizer-prs.github.io/pr/2052/frontend (Takes 3-5 minutes after this completes to be available)

[frontend] [Wed May 1 05:09:58 UTC 2024] - Deployed 26c89fc to https://genshin-optimizer-prs.github.io/pr/2052/frontend (Takes 3-5 minutes after this completes to be available)

[Wed May 1 05:37:32 UTC 2024] - Deleted deployment

@LukasHuth LukasHuth marked this pull request as draft April 30, 2024 17:03
LukasHuth added a commit to LukasHuth/genshin-optimizer that referenced this pull request Apr 30, 2024
I changed the code, so that the `,` or `.` only gets deleted if they are
followed by 3 digits. Since artifacts only have a precision of one digit
this method should not delete any `,` or `.` used for floating point
seperation.
I changed the code, so that the `,` or `.` only gets deleted if they are
followed by 3 digits. Since artifacts only have a precision of one digit
this method should not delete any `,` or `.` used for floating point
seperation.
@LukasHuth LukasHuth requested a review from frzyc April 30, 2024 18:24
@LukasHuth LukasHuth marked this pull request as ready for review April 30, 2024 18:24
libs/gi/art-scanner/src/lib/parse.ts Outdated Show resolved Hide resolved
@frzyc
Copy link
Owner

frzyc commented Apr 30, 2024

Also need to format using yarn run mini-ci or nx format:write

Add forgotten `\` to escape the `.` of the regex

Co-authored-by: frzyc <frzyc@users.noreply.github.com>
@LukasHuth LukasHuth marked this pull request as draft April 30, 2024 19:49
@LukasHuth LukasHuth marked this pull request as ready for review April 30, 2024 21:36
the regex caught .000 but also everything abouve like .00000 and now it
olny catches, if the `.` is followed by 3 `0`s. I also ran `yarn run
mini-ci` this time.
@frzyc frzyc linked an issue May 1, 2024 that may be closed by this pull request
@frzyc
Copy link
Owner

frzyc commented May 1, 2024

LGTM, thanks for the fix.

@frzyc frzyc merged commit efcfe5a into frzyc:master May 1, 2024
6 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.

Error in the Screenshot parsing
2 participants