"#)?;
html_output.push_str("");
for line in LinesWithEndings::from(&code_text.borrow()) {
- let ranges: Vec<(Style, &str)> = h.highlight_line(line, &ps).unwrap();
- let escaped = styled_line_to_highlighted_html(&ranges[..], IncludeBackground::No).unwrap();
+ let ranges: Vec<(Style, &str)> = h.highlight_line(line, &ps)?;
+ let escaped = styled_line_to_highlighted_html(&ranges[..], IncludeBackground::No)?;
html_output.push_str(&escaped);
}
html_output.push_str("");