Revision: 8395 Author: xqt Date: 2010-08-10 19:04:28 +0000 (Tue, 10 Aug 2010)
Log Message: ----------- ISBN numbers never ends with dash. (todo: make a global regex and change the others too)
Modified Paths: -------------- trunk/pywikipedia/isbn.py
Modified: trunk/pywikipedia/isbn.py =================================================================== --- trunk/pywikipedia/isbn.py 2010-08-10 12:16:09 UTC (rev 8394) +++ trunk/pywikipedia/isbn.py 2010-08-10 19:04:28 UTC (rev 8395) @@ -1359,7 +1359,7 @@ return i.code
def hyphenateIsbnNumbers(text): - isbnR = re.compile(r'(?<=ISBN )(?P<code>[\d-]+[Xx]?)') + isbnR = re.compile(r'(?<=ISBN )(?P<code>[\d-]+[\dXx])') text = isbnR.sub(_hyphenateIsbnNumber, text) return text