Skip to content

Commit

Permalink
Add note symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
wvengen committed Oct 24, 2024
1 parent 843ab19 commit dc30ce5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/food_ingredient_parser/loose/scanner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class Scanner

SEP_CHARS = "|;,.".freeze
AND_SEP_RE = /\A\s*(and|en|und)\s+/i.freeze
MARK_CHARS = "¹²³⁴⁵ᵃᵇᶜᵈᵉᶠᵍªº⁽⁾†‡⁺•°▪◊#^˄*~".freeze
MARK_CHARS = "¹²³⁴⁵ᵃᵇᶜᵈᵉᶠᵍªº⁽⁾†‡⁺•°▪◊#^˄*~".freeze
PREFIX_RE = /\A\s*(ingredients(\s*list)?|contains|ingred[iï][eë]nt(en)?(declaratie)?|bevat|dit zit er\s?in|samenstelling|zutaten)\b\s*[:;.]?\s*/i.freeze
NOTE_RE = /\A\b(dit product kan\b|deze verpakking kan\b|kan sporen\b.*?\bbevatten\b|voor allergenen\b|allergenen\b|allergie[- ]informatie(\s*:|\b)|E\s*=|gemaakt in\b|geproduceerd in\b|bevat mogelijk\b|kijk voor meer\b|allergie-info|in de fabriek\b|in dit bedrijf\b|voor [0-9,.]+ (g\.?|gr\.?|ram|ml).*\bis [0-9,.]+ (g\.?|gr\.?|ram|ml).*\bgebruikt\b)/i.freeze
# Keep in sync with +abbrev+ in the +Common+ grammar, plus relevant ones from the +Amount+ grammar.
Expand Down
4 changes: 2 additions & 2 deletions lib/food_ingredient_parser/strict/grammar/common.treetop
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ module FoodIngredientParser::Strict::Grammar
[¹²³⁴⁵ᵃᵇᶜᵈᵉᶠᵍªº] '⁾'? /
'⁽' [¹²³⁴⁵ᵃᵇᶜᵈᵉᶠᵍªº] '⁾' /
[˄^] digit /
[†‡⁺•°▪◊#˄^~˛] /
[†‡⁺•°▪◊#˄^~˛] /
'*'+ /
'(' ws* ( [†‡⁺•°▪◊#˄^~˛] / '*'+ ) ws* ')'
'(' ws* ( [†‡⁺•°▪◊#˄^~˛] / '*'+ ) ws* ')'
end

rule digit
Expand Down

0 comments on commit dc30ce5

Please sign in to comment.