X-Git-Url: http://git.scottworley.com/tablify/blobdiff_plain/166aa6e27cae04eeddd34e2c395a9371ddc7edee..1ca87bfadfa61703dde1cfc224cec881a68a4f56:/src/lib.rs?ds=sidebyside diff --git a/src/lib.rs b/src/lib.rs index 5077590..3f3dde5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -340,7 +340,7 @@ fn render_cell(config: &Config, col: &str, row: &mut Row) -> HTML { )) } -fn render_leftover(notcol: &str, instances: &[Option]) -> HTML { +fn render_leftover(config: &Config, notcol: &str, instances: &[Option]) -> HTML { let label = HTML::escape(notcol); if instances.len() == 1 && instances[0].is_none() { HTML(format!("{label}")) @@ -360,7 +360,13 @@ fn render_all_leftovers(config: &Config, row: &Row) -> HTML { HTML( order .into_iter() - .map(|notcol| render_leftover(notcol, row.entries.get(notcol).expect("Key vanished?!"))) + .map(|notcol| { + render_leftover( + config, + notcol, + row.entries.get(notcol).expect("Key vanished?!"), + ) + }) .map(|html| html.0) // Waiting for slice_concat_trait to stabilize .collect::>() .join(", "),