[Pywikipedia-l] SVN: [6227] trunk/pywikipedia/fixes.py
wikipedian at svn.wikimedia.org
wikipedian at svn.wikimedia.org
Wed Jan 7 20:11:36 UTC 2009
Revision: 6227
Author: wikipedian
Date: 2009-01-07 20:11:35 +0000 (Wed, 07 Jan 2009)
Log Message:
-----------
isbn: fix ISBNs with non-breaking spaces ( )
Modified Paths:
--------------
trunk/pywikipedia/fixes.py
Modified: trunk/pywikipedia/fixes.py
===================================================================
--- trunk/pywikipedia/fixes.py 2009-01-05 21:51:09 UTC (rev 6226)
+++ trunk/pywikipedia/fixes.py 2009-01-07 20:11:35 UTC (rev 6227)
@@ -394,8 +394,9 @@
# these won't be changed.
(r'ISBN (978|979) *[\- –\.] *(\d+) *[\- –\.] *(\d+) *[\- –\.] *(\d+) *[\- –\.] *(\d)(?!\d)', r'ISBN \1-\2-\3-\4-\5'), # ISBN-13
(r'ISBN (\d+) *[\- –\.] *(\d+) *[\- –\.] *(\d+) *[\- –\.] *(\d|X|x)(?!\d)', r'ISBN \1-\2-\3-\4'), # ISBN-10
- # missing space before ISBN-10 or before ISBN-13
- (r'ISBN((\d(-?)){12}\d|(\d(-?)){9}[\dXx])', r'ISBN \1'),
+ # missing space before ISBN-10 or before ISBN-13,
+ # or non-breaking space.
+ (r'ISBN(| | )((\d(-?)){12}\d|(\d(-?)){9}[\dXx])', r'ISBN \2'),
],
'exceptions': {
'inside-tags': [
More information about the Pywikipedia-l
mailing list