Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

Commit 7940bb9

Browse files
committed
Python 2.5/2.6 compatibility
1 parent de24b31 commit 7940bb9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

setup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,19 +75,19 @@ def readme():
7575
readme = f.read()
7676
except IOError:
7777
pass
78-
return re.sub(
79-
r'''
78+
pattern = re.compile(r'''
8079
(?P<colon> : \n{2,})?
8180
\.\. [ ] code-block:: \s+ [^\n]+ \n
8281
[^ \t]* \n
8382
(?P<block>
8483
(?: (?: (?: \t | [ ]{3}) [^\n]* | [ \t]* ) \n)+
8584
)
86-
''',
85+
''', re.VERBOSE)
86+
return pattern.sub(
8787
lambda m: (':' + m.group('colon') if m.group('colon') else '') +
8888
'\n'.join(' ' + l for l in m.group('block').splitlines()) +
8989
'\n\n',
90-
readme, 0, re.VERBOSE
90+
readme, 0
9191
)
9292

9393

0 commit comments

Comments
 (0)