@@ -62,7 +62,7 @@ fn parse<'a>(contents: &'a str, theme: Option<&Theme>) -> tui::text::Text<'a> {
6262 match tag {
6363 Tag::Heading(_) | Tag::Paragraph | Tag::CodeBlock(CodeBlockKind::Fenced(_)) => {
6464 // whenever code block or paragraph closes, new line
65− let spans = std::mem::replace(&mut spans, Vec::new());
65+ let spans = std::mem::take(&mut spans);
6666 if !spans.is_empty() {
6767 lines.push(Spans::from(spans));
6868 }
@@ -118,7 +118,7 @@ fn parse<'a>(contents: &'a str, theme: Option<&Theme>) -> tui::text::Text<'a> {
118118 slice = &slice[end + 1..];
119119
120120 // make a new line
121− let spans = std::mem::replace(&mut spans, Vec::new());
121+ let spans = std::mem::take(&mut spans);
122122 lines.push(Spans::from(spans));
123123 }
124124