Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
jdidion committed Oct 5, 2023
1 parent 01e92e5 commit 2ace450
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions pest-test/src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,13 @@ impl<'a> ExpressionFormatter<'a> {
}

pub(crate) fn write_str(&mut self, s: &str) -> FmtResult {
println!("write_str {:?}", self.color);
match self.color {
Some(color) => self
.writer
.write_str(format!("{}", s.color(color)).as_ref()),
Some(color) => {
let s = format!("{}", s.color(color));
println!("write_str color {s}");
self.writer.write_str(s.as_ref())
}
None => self.writer.write_str(s),
}
}
Expand All @@ -219,6 +222,7 @@ impl<'a> ExpressionFormatter<'a> {
buffering: false,
};
string_formatter.fmt(expression)?;
println!("color {:?}", self.color);
self.write_str(buf.as_ref())?;
Ok(())
}
Expand Down

0 comments on commit 2ace450

Please sign in to comment.