Hide <p> for empty text from markdown.

This commit is contained in:
Jimmy Zelinskie 2015-01-07 17:42:52 -05:00
parent 8464b54ad9
commit 023f40c06f
2 changed files with 5 additions and 2 deletions

View file

@ -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 == '' ? '<p style="visibility:hidden">easter egg</p>' : html;
}