| 1 | --- doclifter.orig 2006-12-25 00:43:35.000000000 -0700 |
| 2 | +++ doclifter 2009-09-30 15:11:17.000000000 -0600 |
| 3 | @@ -126,7 +126,7 @@ |
| 4 | $Id: doclifter,v 1.1336 2006/12/22 14:41:03 esr Exp $ |
| 5 | """ |
| 6 | # Requires Python 2.2a |
| 7 | -import sys, os, glob, re, sre, string, exceptions, copy, tempfile, time, pprint |
| 8 | +import sys, os, glob, re, string, exceptions, copy, tempfile, time, pprint |
| 9 | |
| 10 | # This is a speed hack recommended by Armin Rigo. It cuts runtime by about 33% |
| 11 | # and makes it possible for psyco 1.2 to reduce runtime another 33%. |
| 12 | @@ -385,8 +385,8 @@ |
| 13 | if line.startswith('.\\" | '): |
| 14 | print line |
| 15 | # Someday we'll have more declarations |
| 16 | - (mark, token, as, markup) = line[5:].split() |
| 17 | - if mark != "mark" or as != "as": |
| 18 | + (mark, token, asvalue, markup) = line[5:].split() |
| 19 | + if mark != "mark" or asvalue != "as": |
| 20 | continue |
| 21 | self.post(token, markup) |
| 22 | def __repr__(self): |
| 23 | @@ -6370,8 +6370,8 @@ |
| 24 | return result |
| 25 | def styleargs(self, args, tag, attribute="", prefix=""): |
| 26 | return self.process_punct(args, lambda x: self.stylehook(x, tag, attribute, prefix), 1) |
| 27 | - def replacemacro(self, args, with): |
| 28 | - return self.process_punct(args, lambda x: [with] + x, 1) |
| 29 | + def replacemacro(self, args, replacement): |
| 30 | + return self.process_punct(args, lambda x: [replacement] + x, 1) |
| 31 | def eval(self, args): |
| 32 | "Evaluate a macro, returning a list." |
| 33 | if args[0][0] == '.': |