diff --git a/src/lib.rs b/src/lib.rs index 4857efc..8d94682 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -91,7 +91,7 @@ impl<'a> Parse for SyntectParser<'a> { let syntax = self .syntax_set .find_syntax_by_token(&captures[1]) - .unwrap_or(self.syntax_set.find_syntax_plain_text()); + .unwrap_or_else(|| self.syntax_set.find_syntax_plain_text()); highlighted_html_for_string( &captures[2],