From cc2378d55111b3745a8f980f34b1f7b1126f37b1 Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Mon, 19 Aug 2024 12:04:29 -0700 Subject: [PATCH 1/1] HTML, CSS, & JS Copied over from the old prototype --- src/lib.rs | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 8d60eb8..c2da4c9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,6 +2,42 @@ use std::collections::{HashMap, HashSet}; use std::io::BufRead; use std::iter::Iterator; +const HEADER: &str = " + + + + + + + + + + "; +const FOOTER: &str = " +
+ +"; + #[derive(Debug, PartialEq, Eq)] struct RowInput { label: String, @@ -89,7 +125,7 @@ fn column_counts(rows: &[RowInput]) -> Vec<(usize, String)> { pub fn tablify(input: impl std::io::Read) -> Result { let rows = read_rows(input).collect::, _>>()?; let _columns = column_counts(&rows); - Ok(String::from("Hello, world!")) + Ok(String::from(HEADER) + "Hello, world!" + FOOTER) } #[cfg(test)] -- 2.44.1