diff --git a/poxx.py b/poxx.py index d907615..a38b024 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)|(?:\{\w+\}))", data) for i, tok in enumerate(toks): if i % 2: self.s += tok