Revision: 4262 Author: wikipedian Date: 2007-09-13 08:46:31 +0000 (Thu, 13 Sep 2007)
Log Message: ----------- bugfix
Modified Paths: -------------- trunk/pywikipedia/isbn.py
Modified: trunk/pywikipedia/isbn.py =================================================================== --- trunk/pywikipedia/isbn.py 2007-09-13 08:46:15 UTC (rev 4261) +++ trunk/pywikipedia/isbn.py 2007-09-13 08:46:31 UTC (rev 4262) @@ -1356,8 +1356,8 @@ except InvalidIsbnException: # don't change return code - i.format() - return i.code + i13 = i.toISBN13() + return i13.code
def convertIsbn10toIsbn13(text): isbnR = re.compile(r'(?<=ISBN )(?P<code>[\d-]+X?)') @@ -1386,6 +1386,7 @@ newText = oldText if self.to13: newText = self.isbnR.sub(_isbn10toIsbn13, newText) + if self.format: newText = self.isbnR.sub(_hyphenateIsbnNumber, newText) self.save(page, newText)