Skip to content
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

Article summaries and blog.summary.separator producing malformed mark-up #265

Closed
FearGoidte opened this issue Oct 15, 2015 · 1 comment
Closed
Labels

Comments

@FearGoidte
Copy link

I am having trouble generating article summaries using the blog.summary.separator. This is my first attempt with Middleman-blog so no doubt it is a simple error on my part. No amount of DuckDuckGoing has helped me.

Setup

The blog.summary.separator is set in config.rb as:

blog.summary_separator = /(READMORE)/

The article markdown source file text is as follows:

Blog summary

READMORE

First paragraph.

Result

When I use article.body this source text generates:

<p>Blog summary.</p>

<p></p>

<p>First paragraph.</p>

When I use article.summary it generates:

<p>Blog summary.</p>

<p>

If I change the article markdown source file to:

Blog summary
READMORE
First paragraph.

Article body:

<p>Blog summary. First paragraph.</p>

When I use article.summary it generates:

<p>Blog summary.

Why is it a problem?

I do not want the empty paragraph tag in the article body and as I am serving the built files using the application/xhtml+xml media type, I definitely do not want the un-closed paragraph in the article summary.

@iwarner
Copy link
Contributor

iwarner commented Mar 23, 2017

@FearGoidte Can you confirm the referenced merge fixed your issue - if not please re-open.

@iwarner iwarner closed this as completed Mar 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants