# HG changeset patch # User Paul Boddie # Date 1381836503 -7200 # Node ID 6880a13390fa432ea4229c125bf556abc08eaf19 # Parent bdc05cebca78e0025d1bfe3dd02086f4731b2120 Fixed the extraction of "verbatim" text in getSimpleWikiText. diff -r bdc05cebca78 -r 6880a13390fa MoinSupport.py --- a/MoinSupport.py Sat Oct 12 19:21:46 2013 +0200 +++ b/MoinSupport.py Tue Oct 15 13:28:23 2013 +0200 @@ -968,7 +968,28 @@ # NOTE: Re-implementing support for verbatim text and linking avoidance. - return "".join([s for s in verbatim_regexp.split(text) if s is not None]) + l = [] + last = 0 + + for m in verbatim_regexp.finditer(text): + start, end = m.span() + l.append(text[last:start]) + + # Process the verbatim macro arguments. + + args = m.group("verbatim") or m.group("verbatim2") + if args: + l += [v for (n, v) in parseMacroArguments(args)] + + # Or just add the match groups. + + else: + l += [s for s in m.groups() if s] + + last = end + + l.append(text[last:]) + return "".join(l) def getEncodedWikiText(text): diff -r bdc05cebca78 -r 6880a13390fa README.txt --- a/README.txt Sat Oct 12 19:21:46 2013 +0200 +++ b/README.txt Tue Oct 15 13:28:23 2013 +0200 @@ -72,6 +72,7 @@ * Fixed DateSupport to handle NonExistentTimeError. * Added macro argument quoting functions. * Fixed the quoting of text presented as an argument to the Verbatim macro. + * Fixed the extraction of "verbatim" text in getSimpleWikiText. New in MoinSupport 0.4 (Changes since MoinSupport 0.3) ------------------------------------------------------