- Replace
ariadne
dependency withcodesnake
. Because of this, errors may have some minor differences.
- Fixed name and url parsing in
author
andsource
special metadata keys. Before, the name was too restrictive and some names could be miss interpreted as URLs. (thanks to @Someone0nEarth)
- Panic when parsing just metadata.
- The parser now has the option to check every metadata entry with a custom
function. See
ParseOptions
.
- Replace recipe ref checks API with
ParseOptions
. This now also holds the metadata validator. - Tags are no longer check. Use a custom entry validator if you need it.
- Special metadata keys are now an extension.
- Improve
Metadata
memory layout and interface. - Emoji can now also be a shortcode like
:taco:
.
- (De)Serializing
ScaleOutcome
was not camel case, so (de)serialization has changed from previous versions. - (De)Serializing format change of
Metadata
special values. Now all special key values whose parsed values have some different representation are under thespecial
field. - Removed all fields except
map
fromMetadata
, now they are methods.
- Add missing auto traits to
SourceReport
and all of it's dependent structs. Notably, it was missingSend
andSync
, which were implemented in previous releases.
- Remove
PassResult::take_output
. Metadata::map_filtered
now returns an iterator instead of a copy of the map.
- Implement
Clone
forPassResult
.
- Reworked intermediate references. Index is gone, now you reference the step or section number directly. Text steps can't be referenced now.
- Rename
INTERMEDIATE_INGREDIENTS
extension toINTERMEDIATE_PREPARATIONS
. - Sections now holds content: steps and text blocks. This makes a clear distinction between the old regular steps and text steps which have been removed.
- Remove name from
Recipe
. The name in cooklang is external to the recipe and up to the library user to handle it. - Remove
analysis::RecipeContent
. Nowanalysis::parse_events
returns aScalableRecipe
directly. - Change the return type of the recipe ref checker.
- Reworked error model.
- Removed
Ingredient::total_quantity
. - Change
Cookware::group_amounts
return type. - Several changes in UnitsFile:
- System is no longer set when declaring a unit with an unspecified system as best of a specific system.
extend.names
,extend.aliases
andextend.symbols
are now combined inextend.units
.
- Removed
UnitCount
andConverter::unit_count_detailed
. - Removed
hide_warnings
arg fromSourceReport
write
,print
andeprint
methods. UseSourceReport::zip
orSourceReport::remove_warnings
.
- New warning for bad single word names. It could be confusing not getting any result because of a unsoported symbol there.
- Improve redundant modifiers warnings.
- Recipe not found warning is now customizable from the result of the recipe ref checker.
- Unknown special metadata keys are now added to the metadata.
- Advanced units removal of
%
now supports range values too. - New error for text value in a timer with the advanced units extension.
- Special metadata keys for time, now use the configured time units. When no units are loaded, fallback unit times are used just for this.
- Bundled units now includes
secs
andmins
as aliases to seconds and minutes. - New warning for overriding special recipe total time with composed time and vice versa.
- Added
ScaledRecipe::group_cookware
. - Rework
GroupedQuantity
API and addGroupedValue
. - Ignored ingredients in text mode are now added as text.
- Several features in UnitsFile to make it more intuitive:
- The best unit of a system can now be from any system. It's up to the user if they want to mix them.
- New
extend.units
, which allows to edit the conversions. - Improve and actually make usable the fractions configuration. Now with an
all
andquantity.<physical_quantity>
options.
- An empty unit after the separator (%) is now a warning and it counts as there is no unit.
- Added
SourceReport::remove_warnings
.
- Text steps were ignored in
components
mode. - Scale text value error was firing for all errors marked with
*
. - Even though number values for quantities were decimal, a big integer would fail to parse. That's no more the case. If it's too big, it will only fail in a fraction.
- Incorrect behaviour with single word components that started with a decimal number.
- Better support for fractions in the parser.
Quantity
convert
/fit
now tries to use a fractional value when needed.
- Use US customary units for imperial units in the bundled
units.toml
file. - Expose more
Converter
methods.
- Several model changes from struct enums to tuple enums and renames.
- New warnings for metadata and sections blocks that failed to parse and are treated as text.
- The
servings
metadata value now rejects when a duplicate amount is given>> servings: 14 | 14 -- this rejects and raise a warning
CooklangError
,CooklangWarning
,ParserError
,ParserWarning
,AnalysisError
,AnalysisWarning
,MetadataError
andMetadata
are nownon_exhaustive
.
Metadata::map_filtered
was filteringslug
, an old special key.
- Only the first temperature in a parser
Text
event was being parsed