@@ -62,7 +62,7 @@ fn parse<'a>(contents: &'a str, theme: Option<&Theme>) -> tui::text::Text<'a> {
62 match tag {
62 match tag {
63 Tag::Heading(_) | Tag::Paragraph | Tag::CodeBlock(CodeBlockKind::Fenced(_)) => {
63 Tag::Heading(_) | Tag::Paragraph | Tag::CodeBlock(CodeBlockKind::Fenced(_)) => {
64 // whenever code block or paragraph closes, new line
64 // 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);
66 if !spans.is_empty() {
66 if !spans.is_empty() {
67 lines.push(Spans::from(spans));
67 lines.push(Spans::from(spans));
@@ -118,7 +118,7 @@ fn parse<'a>(contents: &'a str, theme: Option<&Theme>) -> tui::text::Text<'a> {
118 slice = &slice[end + 1..];
118 slice = &slice[end + 1..];
120 // make a new line
120 // make a new line
121− let spans = std::mem::replace(&mut spans, Vec::new());
121+ let spans = std::mem::take(&mut spans);
122 lines.push(Spans::from(spans));
122 lines.push(Spans::from(spans));