summaryrefslogtreecommitdiffstats
path: root/src/render/markdown.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/markdown.rs')
-rw-r--r--src/render/markdown.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/render/markdown.rs b/src/render/markdown.rs
index f491fc1..f300854 100644
--- a/src/render/markdown.rs
+++ b/src/render/markdown.rs
@@ -205,7 +205,9 @@ impl MarkdownRender {
fn wrap(text: &str, width: usize) -> String {
let indent: usize = text.chars().take_while(|c| *c == ' ').count();
- let wrap_options = textwrap::Options::new(width).initial_indent(&text[0..indent]);
+ let wrap_options = textwrap::Options::new(width)
+ .wrap_algorithm(textwrap::WrapAlgorithm::FirstFit)
+ .initial_indent(&text[0..indent]);
textwrap::wrap(&text[indent..], wrap_options).join("\n")
}