From 4bc7c0de3f8e453b5feaa1751bbb463d68ccae60 Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Mon, 8 Jul 2024 20:51:07 +0200 Subject: [PATCH] Fix comments in lists --- src/runestone.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/runestone.jl b/src/runestone.jl index b6a4baa..9ee883b 100644 --- a/src/runestone.jl +++ b/src/runestone.jl @@ -236,7 +236,9 @@ function spaces_around_x(ctx::Context, node::Node, is_x::F, n_leaves_per_x::Int accept_node!(ctx, kid) looking_for_whitespace = kind(last_leaf(kid)) !== K"Whitespace" # TODO: Duplicated with the branch below. - if looking_for_x + if kind(kid) === K"Comment" + # Keep the state + elseif looking_for_x @assert is_x(kid)::Bool n_x_leaves_visited += 1 if n_x_leaves_visited == n_leaves_per_x