load plaintext

This commit is contained in:
kitsunecafe 2024-02-19 17:52:21 -05:00
parent a74c6c9e5c
commit 0ac2f94b48

View file

@ -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],