From 6dbdb0d88d1a8c33cac53046369973cd070f7cec Mon Sep 17 00:00:00 2001
From: Philipp Gesang <pgesang@ix.urz.uni-heidelberg.de>
Date: Sun, 11 Sep 2011 13:39:02 +0200
Subject: exclude \[start|stop]typing environment from paragraph reflowing

---
 mod/tex/context/third/rst/rst_helpers.lua | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'mod/tex/context')

diff --git a/mod/tex/context/third/rst/rst_helpers.lua b/mod/tex/context/third/rst/rst_helpers.lua
index d2fc21d..9f388c1 100644
--- a/mod/tex/context/third/rst/rst_helpers.lua
+++ b/mod/tex/context/third/rst/rst_helpers.lua
@@ -605,7 +605,9 @@ do
             wrapper       = Cs(V"nowhitespace"^0 * (Cs(V"wrapme") + V"other")^1),
             whitespace    = S" \t\v" + P"\n" / function() linelength = 0 end,
             nowhitespace  = 1 - V"whitespace",
-            ignore        = P[[\\type{]]  * (1 - P"}")^0 * P"}",
+            typing        = P[[\\type{]]  * (1 - P"}")^0 * P"}",
+            typingenv     = P[[\\starttyping]] * (1 - P[[\\stoptyping]])^0 * P[[\\stoptyping]],
+            ignore        = V"typing" + V"typingenv",
             -- the initial whitespace of the “other” pattern must not be
             -- enforced (“^1”) as it will break the exceptions (“ignore”
             -- pattern)! In general it is better to have the wrapper ignore some
-- 
cgit v1.2.3