1
0
Fork 0

Add more comments

This commit is contained in:
Jordan Johnson-Doyle 2019-02-12 01:23:06 +00:00
parent 2c1571881e
commit 4fde268117
No known key found for this signature in database
GPG key ID: A95F87B578CE79B6
3 changed files with 21 additions and 2 deletions

View file

@ -7,6 +7,8 @@ use syntect::html::{styled_line_to_highlighted_html, IncludeBackground};
/// 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.
///
/// Returns `None` if the extension isn't supported.
pub fn highlight(content: &str, ext: &str) -> Option<String> {
lazy_static! {
static ref SS: SyntaxSet = SyntaxSet::load_defaults_newlines();