Replace constant with string.

This commit is contained in:
Frank Smit 2015-10-04 22:53:54 +02:00
parent df769725d6
commit 157e5690ab
2 changed files with 4 additions and 1 deletions

View File

@ -117,6 +117,9 @@ def _args_to_int(mapping, argument):
Convert list of strings to an int using a mapping.
"""
if isinstance(argument, int):
if argument == 0:
return 0
deprecation('passing extensions and flags as constants is deprecated')
return argument
elif isinstance(argument, (tuple, list)):

View File

@ -357,7 +357,7 @@ class CustomRendererTest(TestCase):
'math'))
# EXT_UNDERLINE Clashes with emphasis.
render_underline = m.Markdown(TestRenderer(), m.EXT_UNDERLINE)
render_underline = m.Markdown(TestRenderer(), ('underline',))
render_lowlevel = m.Markdown(TestRendererLowlevel())
render_hf = m.Markdown(TestRendererHeaderFooter())