summaryrefslogtreecommitdiffstats
path: root/src/render/markdown.rs
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2023-10-31 10:26:44 +0800
committerGitHub <noreply@github.com>2023-10-31 10:26:44 +0800
commit9b614600c6936c07d31db20a284ca4e66433f45e (patch)
treebb40c914389681307a7069576b7ea472778338af /src/render/markdown.rs
parent680670e834ff57cf6eb15c373870d1fd478f8edb (diff)
downloadaichat-9b614600c6936c07d31db20a284ca4e66433f45e.tar.gz
fix: uncorrected render in command mode (#188)
Diffstat (limited to 'src/render/markdown.rs')
-rw-r--r--src/render/markdown.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/render/markdown.rs b/src/render/markdown.rs
index 8513a43..8ae0a09 100644
--- a/src/render/markdown.rs
+++ b/src/render/markdown.rs
@@ -71,6 +71,10 @@ impl MarkdownRender {
)
}
+ pub(crate) const fn wrap_width(&self) -> Option<u16> {
+ self.wrap_width
+ }
+
pub fn render(&mut self, text: &str) -> String {
text.split('\n')
.map(|line| self.render_line_mut(line))