hastexo / olx-utils

Tools facilitating the creation of Open edX courseware in the Open Learning XML (OLX) format
GNU Affero General Public License v3.0
5 stars 5 forks source link

Fix markdown2.markdown method call #8

Closed fghaas closed 8 years ago

fghaas commented 8 years ago

The method signature for markdown2.markdown is

def markdown(text, html4tags=False, tab_width=DEFAULT_TAB_WIDTH, safe_mode=None, extras=None, link_patterns=None, use_file_vars=False):

In other words, the second positional parameter is html4tags, not extras, and thus calling

markdown2.markdown(content, extras)

... merely initializes html4tags with a True value (for a non-empty list), but doesn't actually enable any extras.

Correct the call to read

markdown2.markdown(content, extras=extras)

And also fix up the other call signature for clarity.

Fixes hastexo/olx-utils#7.