Skip to content

Commit

Permalink
fix: fix newlines in text-based evidence
Browse files Browse the repository at this point in the history
resolves #170
  • Loading branch information
lilopkins committed Apr 26, 2024
1 parent b66251b commit a906dbb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion testangel/src/report_generation/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ pub fn save_report<P: AsRef<Path>>(
for ev in &evidence {
doc.push(elements::Paragraph::new(ev.label.clone()).padded((3, 0, 0, 0)));
match &ev.content {
EvidenceContent::Textual(text) => doc.push(elements::Paragraph::new(text)),
EvidenceContent::Textual(text) => for para in text.split('\n') {
doc.push(elements::Paragraph::new(para));
},
EvidenceContent::ImageAsPngBase64(base64) => {
let data = base64::engine::general_purpose::STANDARD
.decode(base64)
Expand Down

0 comments on commit a906dbb

Please sign in to comment.