diff --git a/src/message/parser.rs b/src/message/parser.rs index 98e531e..2913c42 100644 --- a/src/message/parser.rs +++ b/src/message/parser.rs @@ -191,7 +191,7 @@ impl<'a> Parser<'a> { match &self.state { State::Preformatted(v) => { let s = v.lines.join("\n").to_string(); - self.lines.push(GemtextNode::Text(s)); + self.lines.push(GemtextNode::Preformatted(v.alt.map(str::to_string), s)); self.state = State::Normal; } _ => panic!("Attempted to leave preformatted mode when not in preformatted mode"),