Skip to content

Convert new lines to line breaks when we can't render the description #222

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

Merged
merged 1 commit into from
Mar 5, 2014
Merged
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
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ requires-dist =
Jinja2
PyYAML
raven
readme>=0.1.1
readme>=0.2.0
redis
six
SQLAlchemy
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def recursive_glob(path, pattern, cutdirs=0):
"Jinja2",
"PyYAML",
"raven",
"readme>=0.1.1",
"readme>=0.2.0",
"redis",
"six",
"SQLAlchemy",
Expand Down
5 changes: 4 additions & 1 deletion warehouse/packaging/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ def project_detail(app, request, project_name, version=None):

if release.get("description"):
# Render the project description
description_html = readme.rst.render(release["description"])
description_html, rendered = readme.rst.render(release["description"])

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

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