Skip to content

Commit

Permalink
Reverted .format usage. Keep using the old string formatting as req…
Browse files Browse the repository at this point in the history
  • Loading branch information
ypid committed Jun 3, 2016
1 parent 09f1ed0 commit 66d2f25
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions yaml2rst.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,10 @@ def __init__(self, **keywordargs):
pats['enum'] = ('(%(arabic)s|%(loweralpha)s|%(upperalpha)s|%(lowerroman)s'
'|%(upperroman)s|#)' % enum.sequencepats)

for format_key in enum.formats:
pats[format_key] = '(?P<{}>{}{}{})'.format(
format_key,
re.escape(enum.formatinfo[format_key].prefix),
pats['enum'],
re.escape(enum.formatinfo[format_key].suffix),
)
for format in enum.formats:
pats[format] = '(?P<%s>%s%s%s)' % (
format, re.escape(enum.formatinfo[format].prefix),
pats['enum'], re.escape(enum.formatinfo[format].suffix))

patterns = {
'bullet': u'[-+*\u2022\u2023\u2043]( +|$)',
Expand Down

0 comments on commit 66d2f25

Please sign in to comment.