Ghost/core/frontend/meta
Nazar Gargol 16c3785b52 🐛 Fixed lack of space in excerpt generated from paragraphs
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.
2019-08-26 18:05:14 +02:00
..
amp_url.js Extracted frontend folder (#10780) 2019-06-19 11:30:28 +02:00
asset_url.js Extracted frontend folder (#10780) 2019-06-19 11:30:28 +02:00
author_fb_url.js Extracted frontend folder (#10780) 2019-06-19 11:30:28 +02:00
author_image.js Extracted frontend folder (#10780) 2019-06-19 11:30:28 +02:00
author_url.js Extracted frontend folder (#10780) 2019-06-19 11:30:28 +02:00
blog_logo.js Extracted frontend folder (#10780) 2019-06-19 11:30:28 +02:00
canonical_url.js Extracted frontend folder (#10780) 2019-06-19 11:30:28 +02:00
context_object.js Extracted frontend folder (#10780) 2019-06-19 11:30:28 +02:00
cover_image.js Extracted frontend folder (#10780) 2019-06-19 11:30:28 +02:00
creator_url.js Extracted frontend folder (#10780) 2019-06-19 11:30:28 +02:00
description.js Added global site SEO fields to be used in theme helpers (#10930) 2019-07-25 11:08:29 +02:00
excerpt.js 🐛 Fixed lack of space in excerpt generated from paragraphs 2019-08-26 18:05:14 +02:00
image-dimensions.js Extracted frontend folder (#10780) 2019-06-19 11:30:28 +02:00
index.js Extracted frontend folder (#10780) 2019-06-19 11:30:28 +02:00
keywords.js Extracted frontend folder (#10780) 2019-06-19 11:30:28 +02:00
modified_date.js Extracted frontend folder (#10780) 2019-06-19 11:30:28 +02:00
og_image.js Added global site SEO fields to be used in theme helpers (#10930) 2019-07-25 11:08:29 +02:00
og_type.js Extracted frontend folder (#10780) 2019-06-19 11:30:28 +02:00
paginated_url.js Extracted frontend folder (#10780) 2019-06-19 11:30:28 +02:00
published_date.js Extracted frontend folder (#10780) 2019-06-19 11:30:28 +02:00
rss_url.js Extracted frontend folder (#10780) 2019-06-19 11:30:28 +02:00
schema.js Extracted frontend folder (#10780) 2019-06-19 11:30:28 +02:00
structured_data.js Extracted frontend folder (#10780) 2019-06-19 11:30:28 +02:00
title.js Added global site SEO fields to be used in theme helpers (#10930) 2019-07-25 11:08:29 +02:00
twitter_image.js Added global site SEO fields to be used in theme helpers (#10930) 2019-07-25 11:08:29 +02:00
url.js Extracted frontend folder (#10780) 2019-06-19 11:30:28 +02:00