-
Notifications
You must be signed in to change notification settings - Fork 90
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(javascript-calculator): adjust minus unicode, add noreferrer #376
fix(javascript-calculator): adjust minus unicode, add noreferrer #376
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for taking the time to contribute.
I am happy with this change. I also see the warning about the uncommon unicode character. However, I do not see a 0
in place of it on the production app.
How/where did you get the 301 = 2
?
Every time I would hit the minus key a zero would appear on the calculator. The functionality was working correctly. The only thing I could think of was that it was having trouble with the character. I'm on a mac with chrome if that could be playing a part. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for taking the time to investigate this issue and for these fixes, @Dave2188.
I can replicate this on my Mac running Chrome, where 9-3=6
appears as 903=6
:
Firefox doesn't have the same issue, and the -
operator is displayed correctly.
The fixes here seem to do the trick. Here are some screenshots from Chrome on my Mac after the fixes:
About freeCodeCamp/freeCodeCamp#49045, your fixes might just partially address the issue detailed there. From the comments it looks like some people might have had the -
operator replaced by 0
.
I'm still able to reproduce the specific issue there, where +0+0+0+0+0+0+-1 = -1
is displayed as --1 = -1
. Though strangely it only happens if +0
appears 6 or more times. Less than 6 times and everything is displayed properly.
I think we can accept this as an improvement for people running Chrome / Chromium on Macs, and leave that issue open in case someone comes up with a fix.
I found the fix to the last issue discussed above and another around when you minus a number by a negative number. Should push it to this branch or create a new one for checking? |
@scissorsneedfoodtoo These are some shots of the output after entering +0+0+0+0+0+0+0+-1, which now displays correctly, and 9 - -9 before displayed 18 and now displays correctly with 0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for all your work on this 👍
Changes deployed! |
Checklist:
Update index.md
)Partially addresses #49045
I included the closing number for issue 49045 because while working on it, I could not replicate that specific issue. In the process, I discovered that the minus operator was showing as a zero. I changed the character based on the warning and has seemed to fix the issue.
Also was receiving a warning due to missing rel-tag, so I included that as well.