diff options
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -102,6 +102,11 @@ fn capture(chars: &[char]) -> Option<(Ingredient, usize)> { unit = Some(String::new()); break; } + Some(&',') => { + i += 1; + addendum = Some(String::new()); + break; + } Some(&'}') => { i += 1; break; @@ -115,6 +120,7 @@ fn capture(chars: &[char]) -> Option<(Ingredient, usize)> { } // Unit + if let Some(ref mut unit) = unit { loop { match chars.get(i) { |