From 023f40c06f4c880711eb3ea2a275a39afe80464c Mon Sep 17 00:00:00 2001 From: Jimmy Zelinskie Date: Wed, 7 Jan 2015 17:42:52 -0500 Subject: [PATCH] Hide

for empty text from markdown. --- static/js/app.js | 5 ++++- static/partials/repo-list.html | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/static/js/app.js b/static/js/app.js index 1a84fef29..63eee0d6e 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -120,7 +120,10 @@ function createOrganizationTeam(ApiService, orgname, teamname, callback) { } function getMarkedDown(string) { - return Markdown.getSanitizingConverter().makeHtml(string || ''); + // This automatically puts text into paragraph tags, which may or may not effect + // the style of a page. For consistency, we make sure empty text is paragraph tags. + var html = Markdown.getSanitizingConverter().makeHtml(string || ''); + return html == '' ? '

easter egg

' : html; } diff --git a/static/partials/repo-list.html b/static/partials/repo-list.html index fff1c966b..532d976eb 100644 --- a/static/partials/repo-list.html +++ b/static/partials/repo-list.html @@ -1,5 +1,5 @@
-
+