summaryrefslogtreecommitdiff
path: root/rst_parser.lua
diff options
context:
space:
mode:
Diffstat (limited to 'rst_parser.lua')
-rw-r--r--rst_parser.lua16
1 files changed, 6 insertions, 10 deletions
diff --git a/rst_parser.lua b/rst_parser.lua
index bbe1f15..23aa042 100644
--- a/rst_parser.lua
+++ b/rst_parser.lua
@@ -127,13 +127,13 @@ local parser = P{
block = V"explicit_markup"
+ V"target_block"
+ + V"literal_block"
+ Cs(V"list") / rst.escape
+ Cs(V"line_block") / rst.escape
+ Cs(V"table_block") / rst.escape
+ V"transition" --/ rst.escape
+ V"comment_block"
+ Cs(V"section") / rst.escape
- + V"literal_block"
+ Cs(V"block_quote") / rst.escape
+ Cs(V"paragraph") / rst.escape
,
@@ -609,12 +609,8 @@ local parser = P{
-- Literal blocks
--------------------------------------------------------------------------------
- literal_block = V"unquoted_literal_block"
- + V"quoted_literal_block",
-
literal_block = V"literal_block_marker"
- * Cs(V"literal_block_lines"
- * (V"blank_line"^1 * V"literal_block_lines")^0)
+ * Cs(V"literal_block_lines")
* V"end_block"
/ rst.literal_block,
@@ -624,12 +620,12 @@ local parser = P{
+ V"quoted_literal_block_lines",
unquoted_literal_block_lines = V"literal_block_first"
- * (V"literal_block_other"
- - V"blank_line")^0,
+ * (V"blank_line"^-1 * V"literal_block_other")^0
+ ,
quoted_literal_block_lines = V"quoted_literal_block_first"
- * (V"quoted_literal_block_other"
- - V"blank_line")^0,
+ * (V"blank_line"^-1 * V"quoted_literal_block_other")^0
+ ,
literal_block_first = Cmt(V"space"^1, function (s, i, indent)
warn("lbk-f", #indent, "", "", i)