From: Ben Pfaff Date: Thu, 1 May 2025 00:44:11 +0000 (-0700) Subject: more html work X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=05a093b167fecbe624cf9cba6c6e0425be4caf3e;p=pspp more html work --- diff --git a/rust/pspp/src/output/html.rs b/rust/pspp/src/output/html.rs index e1fda2a654..6a316d22c0 100644 --- a/rust/pspp/src/output/html.rs +++ b/rust/pspp/src/output/html.rs @@ -47,7 +47,7 @@ where } fn render(&mut self, pivot_table: &PivotTable) -> std::io::Result<()> { - for (index, layer_indexes) in pivot_table.layers(true).enumerate() { + for layer_indexes in pivot_table.layers(true) { let output = pivot_table.output(&layer_indexes, false); write!(&mut self.writer, "")?; @@ -108,7 +108,7 @@ where if output.caption.is_some() || output.footnotes.is_some() { writeln!(&mut self.writer, "")?; - if let Some(caption) = &output.caption {} + todo!(); writeln!(&mut self.writer, "")?; } } @@ -163,7 +163,8 @@ where &mut style, r#"font-family: "{}""#, Escape::new(&cell.style.font_style.font) - ); + ) + .unwrap(); } if cell.style.font_style.bold { @@ -218,12 +219,12 @@ where let col_span = rect[Axis2::X].len(); if col_span > 1 { - write!(&mut self.writer, r#" colspan="{col_span}"#); + write!(&mut self.writer, r#" colspan="{col_span}"#)?; } let row_span = rect[Axis2::Y].len(); if row_span > 1 { - write!(&mut self.writer, r#" rowspan="{row_span}"#); + write!(&mut self.writer, r#" rowspan="{row_span}"#)?; } write!(&mut self.writer, ">")?; diff --git a/rust/pspp/src/output/pivot/mod.rs b/rust/pspp/src/output/pivot/mod.rs index 352bc9081c..d79e01a3bd 100644 --- a/rust/pspp/src/output/pivot/mod.rs +++ b/rust/pspp/src/output/pivot/mod.rs @@ -1719,7 +1719,7 @@ impl<'a> DisplayValue<'a> { } pub fn has_footnotes(&self) -> bool { - !self.footnotes().next().is_some() + self.footnotes().next().is_some() } pub fn without_suffixes(self) -> Self {