Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions rest_framework/templatetags/rest_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
from django.utils.safestring import SafeData, mark_safe

from rest_framework.compat import (
NoReverseMatch, markdown, pygments_highlight, reverse, template_render
NoReverseMatch, apply_markdown, pygments_highlight, reverse,
template_render
)
from rest_framework.renderers import HTMLFormRenderer
from rest_framework.utils.urls import replace_query_param
Expand Down Expand Up @@ -68,9 +69,9 @@ def form_for_link(link):

@register.simple_tag
def render_markdown(markdown_text):
if not markdown:
if apply_markdown is None:
return markdown_text
return mark_safe(markdown.markdown(markdown_text))
return mark_safe(apply_markdown(markdown_text))


@register.simple_tag
Expand Down