From 5f87065c19769da66a4e5f55f3215ba53f3f124e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20Ram=C3=ADrez?= Date: Fri, 15 Apr 2016 12:07:01 -0600 Subject: [PATCH] Repair bug introduced in 7244e87. --- secretary.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/secretary.py b/secretary.py index f26b5ff..722e1e6 100644 --- a/secretary.py +++ b/secretary.py @@ -237,7 +237,7 @@ class Renderer(object): } for key, value in unescape_rules.items(): - exp = r'(?is)(({0}|{1})[^{0}{1}]*?)({2})([^{3}{4}]*?({3}|{4}))' + exp = r'(?is)(({0}|{1})[^{3}{4}]*?)({2})([^{0}{1}]*?({3}|{4}))' key = re.compile(exp.format( self.environment.variable_start_string, self.environment.block_start_string, @@ -551,7 +551,7 @@ class Renderer(object): return final_xml except ExpatError as e: - near = result.split('\n')[e.lineno -1][e.offset-50:e.offset+50] + near = result.split('\n')[e.lineno -1][e.offset-200:e.offset+200] raise ExpatError('ExpatError "%s" at line %d, column %d\nNear of: "[...]%s[...]"' % \ (ErrorString(e.code), e.lineno, e.offset, near)) except: