summaryrefslogtreecommitdiff
path: root/rst_parser.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <pgesang@ix.urz.uni-heidelberg.de>2010-09-16 19:57:49 +0200
committerPhilipp Gesang <pgesang@ix.urz.uni-heidelberg.de>2010-09-16 19:57:49 +0200
commitc45e21547a2a471ab2147494f505001269374480 (patch)
tree1ed2d5232c4391a63f2248ca05288b2470739598 /rst_parser.lua
parent95482834c8a7a99f677fc6ffafd72399d157f58d (diff)
downloadcontext-rst-c45e21547a2a471ab2147494f505001269374480.tar.gz
fixed grouped single-line comments
Diffstat (limited to 'rst_parser.lua')
-rw-r--r--rst_parser.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/rst_parser.lua b/rst_parser.lua
index f5e3f28..f09e959 100644
--- a/rst_parser.lua
+++ b/rst_parser.lua
@@ -1055,16 +1055,17 @@ local parser = P{
-- Comments
--------------------------------------------------------------------------------
- comment = V"double_dot" * V"whitespace"^0
+ --comment_block = V"comment" * (V"blank_line"^-1 * V"comment")^0,
+ comment = (V"double_dot" * V"whitespace"^0) / ""
* ((V"block_comment" + V"line_comment") - V"footnote_marker" - V"bar")
,
block_comment = V"eol"
* Cs(V"indented_lines")
- * V"eol"^0
+ * V"end_block"
/ rst.block_comment,
- line_comment = Cs((1 - V"eol")^0 * V"eol")
+ line_comment = Cs((1 - V"eol")^0 * V"eol") * V"end_block"^-1
/ rst.line_comment,
--------------------------------------------------------------------------------