diff options
| author | Tatsuya Kyushima <49891479+kyu08@users.noreply.github.com> | 2024-05-02 18:17:50 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-02 17:17:50 +0800 |
| commit | ebad4bb88842812c9a2633cb9e06071114519314 (patch) | |
| tree | 7c747ee9356a22f9168370ddb76d7764320f3763 /src/render/markdown.rs | |
| parent | b6957ae3af07608d92b7dda1709997a8da77c62b (diff) | |
| download | aichat-ebad4bb88842812c9a2633cb9e06071114519314.tar.gz | |
chore: fix typos (#476)
Diffstat (limited to 'src/render/markdown.rs')
| -rw-r--r-- | src/render/markdown.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/render/markdown.rs b/src/render/markdown.rs index 1fb2f5b..3f68ea2 100644 --- a/src/render/markdown.rs +++ b/src/render/markdown.rs @@ -140,11 +140,11 @@ impl MarkdownRender { fn highlight_line(&self, line: &str, syntax: &SyntaxReference, is_code: bool) -> String { let ws: String = line.chars().take_while(|c| c.is_whitespace()).collect(); - let trimed_line: &str = &line[ws.len()..]; + let trimmed_line: &str = &line[ws.len()..]; let mut line_highlighted = None; if let Some(theme) = &self.options.theme { let mut highlighter = HighlightLines::new(syntax, theme); - if let Ok(ranges) = highlighter.highlight_line(trimed_line, &self.syntax_set) { + if let Ok(ranges) = highlighter.highlight_line(trimmed_line, &self.syntax_set) { line_highlighted = Some(format!( "{ws}{}", as_terminal_escaped(&ranges, self.options.truecolor) |
