From 8ed2562454d3d63f6f30bd7324e9afb5ae59572c Mon Sep 17 00:00:00 2001 From: Jakob Wenzel Date: Thu, 7 Jan 2021 19:20:46 +0100 Subject: [PATCH] allow plural-suffixes in ingredient parser --- cookbook/helper/ingredient_parser.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cookbook/helper/ingredient_parser.py b/cookbook/helper/ingredient_parser.py index 1f1b510a..47fc8759 100644 --- a/cookbook/helper/ingredient_parser.py +++ b/cookbook/helper/ingredient_parser.py @@ -58,6 +58,9 @@ def parse_ingredient(tokens): ingredient = '' note = '' if tokens[-1].endswith(')'): + # Check if the matching opening bracket is in the same token + if ((not tokens[-1].startswith('(')) and ('(' in tokens[-1])): + return parse_ingredient_with_comma(tokens) # last argument ends with closing bracket -> look for opening bracket start = len(tokens) - 1 while not tokens[start].startswith('(') and not start == 0: