From 1ca87bfadfa61703dde1cfc224cec881a68a4f56 Mon Sep 17 00:00:00 2001
From: Scott Worley <scottworley@scottworley.com>
Date: Thu, 24 Oct 2024 10:53:42 -0700
Subject: [PATCH] Plumb config into render_leftover()

---
 src/lib.rs | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

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<String>]) -> HTML {
+fn render_leftover(config: &Config, notcol: &str, instances: &[Option<String>]) -> 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::<Vec<_>>()
             .join(", "),
-- 
2.47.2