Skip to content

Commit

Permalink
chore: update handlebars
Browse files Browse the repository at this point in the history
not going to 4.x yet since the whitespace behaviour changed, which would
break existing latex templates, probably
  • Loading branch information
hoodie committed Nov 2, 2023
1 parent 158e783 commit 729f18a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 39 deletions.
48 changes: 12 additions & 36 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ prettytable-rs = { default-features = false, version = "0.10" }

# feature: document_export
# TODO: update to 4.x is trivial but requires testing with current content
handlebars = { version = "2.0", optional = true }
handlebars = { version = "3.0", optional = true }

serde = { version = "1.0", optional = true }
serde_json = { version = "1.0", optional = true }
Expand Down
4 changes: 2 additions & 2 deletions src/document_export/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ impl HelperDef for IncHelper {
h: &Helper<'_, '_>,
_: &Handlebars,
_: &Context,
_: &mut RenderContext<'_>,
_: &mut RenderContext<'_, '_>,
out: &mut dyn Output,
) -> HelperResult {
let param = h.param(0).unwrap().value();
Expand All @@ -79,7 +79,7 @@ impl HelperDef for CountHelper {
h: &Helper<'_, '_>,
_: &Handlebars,
_: &Context,
_: &mut RenderContext<'_>,
_: &mut RenderContext<'_, '_>,
out: &mut dyn Output,
) -> HelperResult {
let count = h.param(0).unwrap().value().as_array().map_or(0, Vec::len);
Expand Down

0 comments on commit 729f18a

Please sign in to comment.