typst / hayagriva

Rusty bibliography management.
Apache License 2.0
350 stars 55 forks source link

Fix --format CLI flag #248

Closed m-haug closed 1 week ago

m-haug commented 2 weeks ago

Previously, the CLI used clap's PossibleValueParser, which only supports parsing strings. However, hayagriva was expecting to parse Format directly. This caused a panic in clap, when trying to convert the String to Format.

With this patch, Format implements ValueEnum, so we can use clap::value_parser to create an EnumValueParser to parse the Format.

PgBiel commented 1 week ago

Thank you!