diff options
author | Stuart Rackham <srackham@methods.co.nz> | 2009-08-28 10:24:09 +1200 |
---|---|---|
committer | Stuart Rackham <srackham@methods.co.nz> | 2009-08-28 10:24:09 +1200 |
commit | 404273799a650dbcb3f77188aa8408c58f921594 (patch) | |
tree | 22ac6bf61ae48e448ef08ac394e4a0aae61f1019 | |
parent | 28eb907c14a325db2a5901c5894f976229d8f376 (diff) | |
download | asciidoc-py3-404273799a650dbcb3f77188aa8408c58f921594.tar.gz |
FIXED: Only the first occurence of passthrough macro was substituted -- this was a problem when the passthrough was part of an attribute reference that occured more than once in a markup template. Patch submitted by Peter Johnson. See http://groups.google.com/group/asciidoc/browse_frm/thread/1269dc2feb1a482c#
-rwxr-xr-x | asciidoc.py | 2 | ||||
-rw-r--r-- | tests/data/testcases.txt | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/asciidoc.py b/asciidoc.py index f939630..9299af2 100755 --- a/asciidoc.py +++ b/asciidoc.py @@ -3309,7 +3309,7 @@ class Macros: """ Replace passthough placeholders with the original passthrough text.""" for i,v in enumerate(self.passthroughs): - text = text.replace('\x07'+str(i)+'\x07', self.passthroughs[i], 1) + text = text.replace('\x07'+str(i)+'\x07', self.passthroughs[i]) return text class Macro: diff --git a/tests/data/testcases.txt b/tests/data/testcases.txt index b17d21b..7633ec9 100644 --- a/tests/data/testcases.txt +++ b/tests/data/testcases.txt @@ -359,3 +359,11 @@ A second glossary term:: The corresponding (indented) definition. endif::basebackend-docbook[] + +Index Terms +----------- +Multi-passthough substitution (see +http://groups.google.com/group/asciidoc/browse_frm/thread/1269dc2feb1a482c) +((`foo`)) +(((foo,`bar`))) +(((foo,`bar`,`two`))) |