mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
closes #10531 - Adds space when encountering closing </p> and <br> tags - The mobiledoc-to-html conversion produces these tags in this exact syntax, so there is no need to account for more cases like additional spaces or alternative syntax like <br /> - Added test cases that cover spacing use-casei - Changed some existing tests to contain more close-to-real-world markup - The downside of this approach is generating multiple spaces in case there are empty paragraphs in the markup. The same concern is true for current "new line" substitution: > excerpt.replace(/(\r\n|\n|\r)+/gm, ' ') but it never has been a concern as in real world when multiple spaces are used inside of the `<p>` tag they are rendered as single space. |
||
---|---|---|
.. | ||
test_tpl | ||
asset_spec.js | ||
author_spec.js | ||
authors_spec.js | ||
body_class_spec.js | ||
concat_spec.js | ||
content_spec.js | ||
date_spec.js | ||
encode_spec.js | ||
excerpt_spec.js | ||
facebook_url_spec.js | ||
foreach_spec.js | ||
get_spec.js | ||
ghost_foot_spec.js | ||
ghost_head_spec.js | ||
has_spec.js | ||
img_url_spec.js | ||
index_spec.js | ||
is_spec.js | ||
lang_spec.js | ||
link_class_spec.js | ||
link_spec.js | ||
meta_description_spec.js | ||
meta_title_spec.js | ||
navigation_spec.js | ||
next_post_spec.js | ||
page_url_spec.js | ||
pagination_spec.js | ||
plural_spec.js | ||
post_class_spec.js | ||
prev_post_spec.js | ||
reading_time_spec.js | ||
t_spec.js | ||
tags_spec.js | ||
template_spec.js | ||
title_spec.js | ||
twitter_url_spec.js | ||
url_spec.js | ||
utils_spec.js |