Bug Description
Ingredients containing a space, ', -, or other non-letter characters are parsed incorrectly. These characters are interpreted as the end of the ingredient. This omits part of the ingredient name as well as the quantity (if it exists) when displaying tooltips. It also results in incorrect syntax highlighting for the ingredient name and associated quantity.
This issue was observed using cookcli 0.32.0 and version 0.4.2 of the Cooklang VSCode plugin.
Expected Result
Ingredients containing spaces or non-letter characters such as @heavy whipping cream{}, @lady's fingers{20} or @sun-dried tomatoes{1/2%cup} are highlighted as a single ingredient with correct styling. When hovered, the tooltip correctly displays the full ingredient name and quantity, the same as ingredients without non-letter characters.
Actual Result
The syntax highlighting for ingredients stops at the first occurrence of non-letter characters.
Example

When hovering the ingredient, the full ingredient name is not displayed, and the quantity is missing from the tooltip.
Example
Steps to Reproduce
-
Create a new file named Tiramisu.cook with the following contents:
Chill @heavy whipping cream{1%cup}.
-
Notice that @heavy is highlighted separately from whipping cream and 1%cup when viewed in VSCode.
-
Hover the ingredient to see that the tooltip displays "Ingredient: heavy" instead of "Ingredient: heavy whipping cream Quantity: 1 cup".
Bug Description
Ingredients containing a space,
',-, or other non-letter characters are parsed incorrectly. These characters are interpreted as the end of the ingredient. This omits part of the ingredient name as well as the quantity (if it exists) when displaying tooltips. It also results in incorrect syntax highlighting for the ingredient name and associated quantity.This issue was observed using
cookcli 0.32.0and version0.4.2of the Cooklang VSCode plugin.Expected Result
Ingredients containing spaces or non-letter characters such as
@heavy whipping cream{},@lady's fingers{20}or@sun-dried tomatoes{1/2%cup}are highlighted as a single ingredient with correct styling. When hovered, the tooltip correctly displays the full ingredient name and quantity, the same as ingredients without non-letter characters.Actual Result
The syntax highlighting for ingredients stops at the first occurrence of non-letter characters.
Example

When hovering the ingredient, the full ingredient name is not displayed, and the quantity is missing from the tooltip.
Example
Steps to Reproduce
Create a new file named
Tiramisu.cookwith the following contents:Notice that
@heavyis highlighted separately fromwhipping creamand1%cupwhen viewed in VSCode.Hover the ingredient to see that the tooltip displays "Ingredient: heavy" instead of "Ingredient: heavy whipping cream Quantity: 1 cup".