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

markdown() helper method wants to strip trailing whitespace but doesn't #16

Closed fghaas closed 7 years ago

fghaas commented 7 years ago

From helpers.py:

    def markdown(content, extras=None):
        # Fix up whitespace.
        if content[0] == u"\n":
            content = content[1:]
        content.rstrip()
        content = textwrap.dedent(content)

content is an immutable string, thus

        content.rstrip()

should really be

        content = content.rstrip()