diff options
author | Philipp Gesang <pgesang@ix.urz.uni-heidelberg.de> | 2010-09-22 22:07:51 +0200 |
---|---|---|
committer | Philipp Gesang <pgesang@ix.urz.uni-heidelberg.de> | 2010-09-22 22:07:51 +0200 |
commit | ec7dbffb15a99faa6c366a049ed3fdf919a51aaf (patch) | |
tree | e6702dc14edcad69f2a1d1db7614b7fb7137ba0e /rst_parser.lua | |
parent | 584c65e596bdc44bd5a9a4a3b6bd02847b48b981 (diff) | |
download | context-rst-ec7dbffb15a99faa6c366a049ed3fdf919a51aaf.tar.gz |
fixed literal blocks
Diffstat (limited to 'rst_parser.lua')
-rw-r--r-- | rst_parser.lua | 16 |
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) |