From d679fd99c95c70576b6c5db548aa34957446a650 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Sun, 2 Mar 2014 17:09:12 +0100 Subject: permit single-item itemizations Closing issue #5 The ``bullet_list`` rule would recognize bulleted lists only if they had least two members. That restriction has been removed. --- src/rst_parser.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/rst_parser.lua b/src/rst_parser.lua index 82e906a..2055e1b 100644 --- a/src/rst_parser.lua +++ b/src/rst_parser.lua @@ -897,7 +897,7 @@ local rst_parser = P { -- the next rule handles enumerations as well bullet_list = V"bullet_init" - * (V"blank_line"^-1 * (V"bullet_list" + V"bullet_continue"))^1 + * (V"blank_line"^-1 * (V"bullet_list" + V"bullet_continue"))^0 * V"bullet_stop" * Cmt(Cc(nil), function (s, i) local depth = state.depth @@ -907,7 +907,8 @@ local rst_parser = P { state.lastbullet = state.lastbullets[depth] state.depth = depth return true - end), + end) + , bullet_stop = V"end_block" / rst.stopitemize, -- cgit v1.2.3