feat: wrap output in code block

This commit is contained in:
LordMZTE 2024-05-22 17:56:21 +02:00
parent 207c2fe818
commit 73ebe230a1
Signed by: LordMZTE
GPG key ID: B64802DC33A64FF6

View file

@ -158,7 +158,7 @@ fn highlight(
let mut hl = HighlightLines::new(syntax, theme);
writeln!(output, "<pre>")?;
writeln!(output, "<pre><code>")?;
for line in reader.lines() {
let line = line.context("Failed to read file")?;
let regions = hl.highlight_line(&line, ss)?;
@ -201,7 +201,7 @@ fn highlight(
writeln!(output)?;
}
writeln!(output, "</pre>")?;
writeln!(output, "</code></pre>")?;
Ok(())
}