Commit 3e93c96e by Paul Oswald

replace unicode call with force_text

parent 192201d5
......@@ -5,6 +5,8 @@ from __future__ import unicode_literals
from django.utils.html import escape
from django.utils.safestring import mark_safe
from django.utils.encoding import force_text
from rest_framework.compat import apply_markdown
import re
......@@ -28,7 +30,7 @@ def dedent(content):
as it fails to dedent multiline docstrings that include
unindented text on the initial line.
"""
content = unicode(content)
content = force_text(content)
whitespace_counts = [len(line) - len(line.lstrip(' '))
for line in content.splitlines()[1:] if line.lstrip()]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment