summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThang Pham <phamducthang1234@gmail.com>2021-12-29 17:26:12 -0500
committerThang Pham <phamducthang1234@gmail.com>2021-12-29 17:26:12 -0500
commit18b51bbf56e16a55924214beb0430e9a5683bb5c (patch)
treef67a54d34dd0a8f4a8c0bf3426dd6d464d93fa44
parent263232292f1cc225cc4f80f105514cf2fba43579 (diff)
add a newline when rendering multiline code in comment
-rw-r--r--hackernews_tui/src/client/parser.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/hackernews_tui/src/client/parser.rs b/hackernews_tui/src/client/parser.rs
index 805d44c..c3739af 100644
--- a/hackernews_tui/src/client/parser.rs
+++ b/hackernews_tui/src/client/parser.rs
@@ -701,6 +701,7 @@ fn parse_comment_helper(text: String, style: Style, s: &mut StyledString, links:
m.as_str(),
style.combine(component_style.multiline_code_block),
);
+ s.append_plain("\n");
} else if let Some(m) = caps.name("code") {
s.append_styled(m.as_str(), style.combine(component_style.single_code_block));
} else if let Some(m) = caps.name("italic") {