summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2014-03-02 17:09:12 +0100
committerPhilipp Gesang <phg@phi-gamma.net>2018-12-02 21:09:42 +0100
commitd679fd99c95c70576b6c5db548aa34957446a650 (patch)
tree2e59cb92c220632d9eef7ee24c06dc738f478f37 /src
parent008c8958d3f19acaac24ce995ce22bb7d9636b58 (diff)
downloadcontext-rst-d679fd99c95c70576b6c5db548aa34957446a650.tar.gz
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.
Diffstat (limited to 'src')
-rw-r--r--src/rst_parser.lua5
1 files 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,