cooklang / cooklang-obsidian

Edit and display CookLang recipes in Obsidian
MIT License
215 stars 16 forks source link

Disabling the "show quantities inline" option only removes (some) units and not the value #5

Closed RichSteele closed 3 years ago

RichSteele commented 3 years ago

I'm not sure the intention of the "show quantities inline" option: when disabled, the quantities are shown but some display without the units. For example:

Crack the @eggs{3} into a blender, then add the @flour{125%g}, @milk{250%ml} and @sea salt{1%pinch}, and blitz until smooth.

image

Notice that the "g" is missing from the flour measurement and the other units are showing. Enabling this option shows the "g" (and all of the others as well).

deathau commented 3 years ago

Yep, I see what I did wrong. My code puts all the measurements in by default, and if the inline quantities setting is disabled, it removes them all. But the code I was using only removed the first quantity and the first unit, instead of all the quantities and units 😖 Will fix in the next version

RichSteele commented 3 years ago

Confirmed this resolves the issue, thank you.