Skip to content

Commit 3f2d55b

Browse files
committed
fix(markdown_viewer): removing leading and trailing newlines
1 parent 8085dd4 commit 3f2d55b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • crates/core/src/markdown_viewer

crates/core/src/markdown_viewer/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ pub fn md_to_ansi(md: &str, config: &McatConfig, markdown_file_path: Option<&Pat
5757

5858
let mut output = String::new();
5959
output.push_str(&ctx.theme.foreground.fg);
60-
output.push_str(&parse_node(root, &mut ctx));
60+
output.push_str(&parse_node(root, &mut ctx).trim_matches('\n'));
6161

6262
// making sure its wrapped to fit into the termianl size
6363
let lines: Vec<String> = textwrap::wrap(&output, term_misc::get_wininfo().sc_width as usize)

0 commit comments

Comments
 (0)