Skip to content

Commit

Permalink
IE11 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
jakeboone02 committed Feb 12, 2021
1 parent 45ed186 commit db1ca12
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,7 @@ const parseIngredient = (ingText: string): Ingredient[] => {
oIng.description = line;

// If the line ends with ":" or starts with "For ", then it is assumed to be a group header.
if (
oIng.description.endsWith(':') ||
oIng.description.toUpperCase().startsWith('FOR ')
) {
if (/:$/.test(oIng.description) || /^For /i.test(oIng.description)) {
oIng.isGroupHeader = true;
}

Expand Down

0 comments on commit db1ca12

Please sign in to comment.