From 853269887cbef331d95e5cb410ac4f6110a3cee4 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Thu, 16 Sep 2010 14:56:47 +0200 Subject: line blocks have now a setup --- rst_context.lua | 16 ++++++++++++++++ rst_parser.lua | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/rst_context.lua b/rst_context.lua index d8b8516..0abcdc6 100644 --- a/rst_context.lua +++ b/rst_context.lua @@ -768,6 +768,7 @@ function rst_context.literal_block (str) end function rst_context.line_block (str) + rst_context.addsetups("lines") return [[ \\startlines @@ -1207,4 +1208,19 @@ function optional_setups.deflist () ]] end +function optional_setups.lines () + return [[ + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Lines environment (line blocks) % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\setuplines[% + space=on,% + before={\startlinecorrection\blank[small]},% + after={\blank[small]\stoplinecorrection},% +] +]] +end + return rst_context diff --git a/rst_parser.lua b/rst_parser.lua index 6f5acbf..432f11a 100644 --- a/rst_parser.lua +++ b/rst_parser.lua @@ -101,7 +101,7 @@ local parser = P{ block = V"explicit_markup" + V"target_block" + Cs(V"list") / rst.escape - + V"line_block" + + Cs(V"line_block") / rst.escape + Cs(V"table_block") / rst.escape + Cs(V"section") / rst.escape + Cs(V"transition") --/ rst.escape -- cgit v1.2.3