diff options
author | Philipp Gesang <pgesang@ix.urz.uni-heidelberg.de> | 2010-09-16 13:52:00 +0200 |
---|---|---|
committer | Philipp Gesang <pgesang@ix.urz.uni-heidelberg.de> | 2010-09-16 13:52:00 +0200 |
commit | f000dddf30b29568512dcdaa969c2ece42b88413 (patch) | |
tree | 27db302bd82c3c27fca715744ed29ac95d453cab | |
parent | 4b62abbe95a34b6a358288efa7a0f776eadda0d4 (diff) | |
download | context-rst-f000dddf30b29568512dcdaa969c2ece42b88413.tar.gz |
fixed ambiguity in definition lists vs. block quotes
-rw-r--r-- | rst_parser.lua | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/rst_parser.lua b/rst_parser.lua index bee69f7..6f5acbf 100644 --- a/rst_parser.lua +++ b/rst_parser.lua @@ -98,7 +98,8 @@ local parser = P{ -- Blocks -------------------------------------------------------------------------------- - block = V"target_block" + block = V"explicit_markup" + + V"target_block" + Cs(V"list") / rst.escape + V"line_block" + Cs(V"table_block") / rst.escape @@ -106,7 +107,6 @@ local parser = P{ + Cs(V"transition") --/ rst.escape + V"literal_block" + Cs(V"block_quote") / rst.escape - + V"explicit_markup" + V"comment" + Cs(V"paragraph") / rst.escape , @@ -115,11 +115,6 @@ local parser = P{ -- Explicit markup block -------------------------------------------------------------------------------- - --explicit_markup = V"double_dot" * V"whitespace" - --* V"explicit_body" - --* V"whitespace" - --, - explicit_markup_start = V"double_dot" * V"whitespace", explicit_markup = V"footnote_block" @@ -128,6 +123,12 @@ local parser = P{ --+ V"comment block" , + --explicit_markup = V"substitution_definition" + ----+ V"directive" + --+ V"footnote_block" + ----+ V"comment block" + --, + explicit_markup_block = V"explicit_markup"^1 * V"end_block" , @@ -734,7 +735,7 @@ local parser = P{ * Ct(V"definition_def")) , - definition_term = (1 - V"eol" - V"definition_classifier_separator")^1 + definition_term = -#V"space" * (1 - V"eol" - V"definition_classifier_separator")^1 , definition_classifier_separator = V"space" * V"colon" * V"space", |