Skip to content

Support markdown in description #238

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ requires-dist =
guard
html5lib
Jinja2
markdown
PyYAML
raven
readme>=0.2.0
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def recursive_glob(path, pattern, cutdirs=0):
"guard",
"html5lib",
"Jinja2",
"markdown",
"PyYAML",
"raven",
"readme>=0.2.0",
Expand Down
3 changes: 2 additions & 1 deletion warehouse/packaging/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from __future__ import unicode_literals

import jinja2
import markdown
import readme.rst

from werkzeug.exceptions import NotFound
Expand Down Expand Up @@ -81,7 +82,7 @@ def project_detail(app, request, project_name, version=None):
description_html, rendered = readme.rst.render(release["description"])

if not rendered:
description_html = description_html.replace("\n", "<br>")
description_html = markdown.markdown(description_html)

if app.config.camo:
description_html = camouflage_images(
Expand Down