-
Notifications
You must be signed in to change notification settings - Fork 93
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 unicode fraction conversion #2498
Comments
Hi @christianlupus I'll have a look at this one. Do you want to support the common Unicode fractions or custom Unicode fractions like ⁷⁷⁄₇₈ too? |
Uhh, maybe I fucked the regex |
In the PR there was a discussion to mainly look for x/2, x/4, and x/16 as far as I remember. I suggest you two align a bit to avoid duplicate work. |
Ahh and one more point: I want to push out a release tomorrow. On Saturday there is a NC server release and we need a new cookbook version ready as otherwise these will complain. I am okay with delaying this until after the release. Just be warned that I am not going to be able to do much about this in the next few hours. 😉 |
Yeah ideally we should probably use the same regex, but the easy solution is this:
I missed the u flag. |
Feel free to give it a go from my side. Ideally there is some error handling involved if we update the regex (for whatever reason), this is not breaking again. |
Description
When using unicode fractions, the web UI reports the ingredient to not be parsable but in fact it is parsable and correctly calculated.
Reproduction
Steps to reproduce the behavior:
Expected behavior
No warning is shown to the user
Actual behavior
A warning sign is shown to the user indicating a problem with the calculation (see screenshots).
Screenshots
After changing the yield amount:
Browser
Firefox
Versions
Nextcloud server version: 30
Cookbook version: 0.11.1
Database system: MySQL
Maybe @Weissnix4711 or @j0hannesr0th, can you have a look at this? Ideally, I would say that the same Regex is used to check and to do the actual calculation to avoid such conflicts. That would mean some restructuring but should be managable.
The text was updated successfully, but these errors were encountered: