feat: strip leading quantitiy prefixes + improved uom regex#49
Conversation
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit af2d03f:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #49 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 5 5
Lines 2373 2611 +238
==========================================
+ Hits 2373 2611 +238 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hey @jakeboone02 have you had time to review the changes yet? |
|
Sorry for the silence lately! I'm traveling abroad for work and won't really have a chance to look at my open source projects for probably a couple more weeks. |
Alright, then have fun :) |
|
Updated based on this initial review by Copilot: Alignment with codebase ✅The PR follows established patterns well:
Issues & concerns1. Potential crash on empty 2. 3. 4. Infinite loop safety is subtle — 5. Interaction between 6. Ordering sensitivity — Providing Regex changes (slash/paren UOM) ✅The VerdictSolid contribution that aligns with the codebase's i18n strategy. The main actionable items are: add a guard for empty |
|
Thanks for this contribution! It's included in v2.2.0. |
Thanks for the Review! |
Add support for stripping leading quantity prefixes such as "about", "ca." and "bis zu" from ingredients.
Enhanced regex patterns to support additional plural markers for units of measure (e.g., slash or parenthetical forms like "Scheibe/n", "Scheibe(n)", often used on germanys most popular recipe site
chefkoch.de).Add tests for both features
Update README to document the new
leadingQuantityPrefixesoption.