diff options
Diffstat (limited to 'crates/germ/src/ast/container.rs')
| -rw-r--r-- | crates/germ/src/ast/container.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/germ/src/ast/container.rs b/crates/germ/src/ast/container.rs index e97a092..793473b 100644 --- a/crates/germ/src/ast/container.rs +++ b/crates/germ/src/ast/container.rs @@ -232,7 +232,12 @@ impl Ast { if *in_preformatted { alt_text = line.get(3..).unwrap_or("").to_string(); - line = lines.next().unwrap(); + + if let Some(next_line) = lines.next() { + line = next_line; + } else { + break; + } } else { nodes.push(Node::PreformattedText { alt_text: if alt_text.is_empty() { |