forked from MIrrors/bin
Run cargo fmt
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
extern crate syntect;
|
||||
|
||||
use syntect::parsing::SyntaxSet;
|
||||
use syntect::highlighting::ThemeSet;
|
||||
use syntect::easy::HighlightLines;
|
||||
use syntect::highlighting::ThemeSet;
|
||||
use syntect::html::{styled_line_to_highlighted_html, IncludeBackground};
|
||||
use syntect::parsing::SyntaxSet;
|
||||
|
||||
/// Takes the content of a paste and the extension passed in by the viewer and will return the content
|
||||
/// highlighted in the appropriate format in HTML.
|
||||
@@ -19,5 +19,8 @@ pub fn highlight(content: &str, ext: &str) -> Option<String> {
|
||||
let mut h = HighlightLines::new(syntax, &TS.themes["base16-ocean.dark"]);
|
||||
let regions = h.highlight(content, &SS);
|
||||
|
||||
Some(styled_line_to_highlighted_html(®ions[..], IncludeBackground::No))
|
||||
}
|
||||
Some(styled_line_to_highlighted_html(
|
||||
®ions[..],
|
||||
IncludeBackground::No,
|
||||
))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user