From a39c3bcf039e218b4926be90526085dd86c30b0e Mon Sep 17 00:00:00 2001 From: James Robert Date: Wed, 28 Aug 2013 14:23:52 -0400 Subject: [PATCH] also don't munge placeholders formatted as "%s" --- poxx.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/poxx.py b/poxx.py index d907615..dfa35bb 100755 --- a/poxx.py +++ b/poxx.py @@ -78,7 +78,7 @@ def handle_endtag(self, tag): def handle_data(self, data): # We don't want to munge placeholders, so split on them, keeping them # in the list, then xform every other token. - toks = re.split(r"(%\(\w+\)s)", data) + toks = re.split(r"(%(?:\(\w+\))?s)", data) for i, tok in enumerate(toks): if i % 2: self.s += tok