use std::io::BufRead;
use std::iter::Iterator;
+pub struct Config {}
+
const HEADER: &str = "<!DOCTYPE html>
<html>
<head>
/// * there's an i/o error while reading `input`
/// * the log has invalid syntax:
/// * an indented line with no preceding non-indented line
-pub fn tablify(input: impl std::io::Read) -> Result<HTML, std::io::Error> {
+pub fn tablify(config: &Config, input: impl std::io::Read) -> Result<HTML, std::io::Error> {
let rows = read_rows(input).collect::<Result<Vec<_>, _>>()?;
let columns = column_order(&rows);
Ok(HTML(format!(
fn main() {
- print!("{}", tablify::tablify(std::io::stdin()).unwrap());
+ print!(
+ "{}",
+ tablify::tablify(&tablify::Config {}, std::io::stdin()).unwrap()
+ );
}