Parser - fix for pushing wrong line type when leaving preformatted block

This commit is contained in:
Nathan Fisher 2023-06-02 11:13:22 -04:00
parent c36009db46
commit 4b43b283dd

View file

@ -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"),