Skip to content

Commit

Permalink
fix: readd agenda header and style it
Browse files Browse the repository at this point in the history
  • Loading branch information
b1rger committed Jan 10, 2024
1 parent 27de042 commit a74337a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/output/agenda.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// SPDX-License-Identifier: MIT

use crate::Context;
use anstyle::Style;

use std::fmt;

Expand All @@ -12,9 +13,10 @@ pub struct Agenda<'a> {

impl fmt::Display for Agenda<'_> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let mut ret: String = String::new();
for pe in self.ctx.eventinstances.iter() {
ret += format!("{pe}\n").as_str();
let style = Style::default().bold();
let mut ret: String = format!("{}Agenda:{}\n", style.render(), style.render_reset());
for ei in self.ctx.eventinstances.iter() {
ret += format!("{ei}\n").as_str();
}
write!(f, "{}", ret)
}
Expand Down

0 comments on commit a74337a

Please sign in to comment.