summaryrefslogtreecommitdiffstats
path: root/src/render/markdown.rs
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2025-07-03 08:50:21 +0800
committerGitHub <noreply@github.com>2025-07-03 08:50:21 +0800
commita833512c19f501f1bea84166e6e41b97274f530b (patch)
tree73f4876d3123cc695f6bbfd094347bd519d4e31f /src/render/markdown.rs
parent65efb2100fa774a3c403ede5a4245bc724c81572 (diff)
downloadaichat-a833512c19f501f1bea84166e6e41b97274f530b.tar.gz
refactor: update deps and models.yaml (#1339)
Diffstat (limited to 'src/render/markdown.rs')
-rw-r--r--src/render/markdown.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/render/markdown.rs b/src/render/markdown.rs
index 33cdf47..9671961 100644
--- a/src/render/markdown.rs
+++ b/src/render/markdown.rs
@@ -1,3 +1,5 @@
+use crate::utils::decode_bin;
+
use ansi_colours::AsRGB;
use anyhow::{anyhow, Context, Result};
use crossterm::style::{Color, Stylize};
@@ -30,8 +32,8 @@ pub struct MarkdownRender {
impl MarkdownRender {
pub fn init(options: RenderOptions) -> Result<Self> {
- let syntax_set: SyntaxSet = bincode::deserialize_from(SYNTAXES)
- .with_context(|| "MarkdownRender: invalid syntaxes binary")?;
+ let syntax_set: SyntaxSet =
+ decode_bin(SYNTAXES).with_context(|| "MarkdownRender: invalid syntaxes binary")?;
let code_color = options
.theme