diff genshi/template/interpolation.py @ 526:bd13c96cbfe4

Fix interpolation of short-form expressions that include literal text before the expression. Thanks to Alec for reporting the issue.
author cmlenz
date Mon, 18 Jun 2007 21:00:39 +0000
parents ff7c72b52fb2
children 74b89383da3f
line wrap: on
line diff
--- a/genshi/template/interpolation.py
+++ b/genshi/template/interpolation.py
@@ -137,6 +137,9 @@
             yield True, text[offset + 1:pos].strip()
 
         elif not escaped and next == PREFIX:
+            if offset > pos:
+                yield False, text[pos:offset]
+                pos = offset
             escaped = True
             pos = offset + 1
 
Copyright (C) 2012-2017 Edgewall Software