aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ast.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ast.rs b/src/ast.rs
index 49ee1f6..eae0683 100644
--- a/src/ast.rs
+++ b/src/ast.rs
@@ -364,7 +364,11 @@ impl Ast {
list_items.push(line.get(1..).unwrap_or("").trim_start().to_string());
- line = lines.next().unwrap();
+ if let Some(next_line) = lines.next() {
+ line = next_line;
+ } else {
+ break;
+ }
}
">" => {
// If the Gemtext line starts with an ">", it is a blockquote, so