Found while reviewing the fix for #490.
static/js/src/cooklang-mode.js returns "measurement" for the quantity part of {200%g} (and "unit" only after %). measurement is not a Lezer highlight tag, so CodeMirror logs "Unknown highlighting tag measurement" and the number gets no class or colour; only the unit is styled.
Fix: map the quantity to a real tag (e.g. t.number) and give it a .cm-cook-quantity class in static/css/input.css on a token colour.
Found while reviewing the fix for #490.
static/js/src/cooklang-mode.jsreturns"measurement"for the quantity part of{200%g}(and"unit"only after%).measurementis not a Lezer highlight tag, so CodeMirror logs "Unknown highlighting tag measurement" and the number gets no class or colour; only the unit is styled.Fix: map the quantity to a real tag (e.g.
t.number) and give it a.cm-cook-quantityclass instatic/css/input.csson a token colour.