From af202d3f0ea24e0a957b02a6f9fb23c6c3b4afe7 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Mon, 19 Dec 2022 09:58:52 +0400 Subject: Fix `start` on ordered lists in mdast Closes GH-38. --- src/to_mdast.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/to_mdast.rs b/src/to_mdast.rs index 4d2ca76..e76bad5 100644 --- a/src/to_mdast.rs +++ b/src/to_mdast.rs @@ -1430,7 +1430,9 @@ fn on_exit_list_item_value(context: &mut CompileContext) { if let Node::List(node) = context.tail_penultimate_mut() { debug_assert!(node.ordered, "expected list to be ordered"); - node.start = Some(start); + if node.start.is_none() { + node.start = Some(start); + } } else { unreachable!("expected list on stack"); } -- cgit