Hugo: <!--more--> break sometimes doesn't work properly and includes the next line after it

Created on 21 Jan 2017  路  6Comments  路  Source: gohugoio/hugo

Example: https://raw.githubusercontent.com/haiku/website/master/content/blog/pulkomandy/2017-01-06_haiku_monthly_activity_report_122016.md and https://www.haiku-os.org/blog/pulkomandy/ -- the "User Interface" header appears in the summary despite being after the <!--more--> break.

We're using Hugo 0.18.

Bug

Most helpful comment

This still doesn't work using v0.26.
Example:

Sample text should be slip here <!--more--> but it is not.

Results in:

<p>Sample text should be slip here but it is not.</p>

Should result in:

<p>Sample text should be slip here</p>

However this works using v0.16

All 6 comments

Confirmed in HEAD (99fd7c684ffebe55713a135fe8b93aaa4e80c229). The issue is that you have raw HTML tags on the next line which causes the Markdown render to render everything inside a single HTML paragraph:

Blah blah
<!--more->
<h3>Title</h3>

foo

Yields:

<p>Blah Blah
<!--more->
<h3>Title</h3></p>

<p>foo</p>

As a work-around, if you convert that title to Markdown (### Title) or add a blank line after the more tag, it works as expected.

Labeled as a Bug, but not sure how to fix this.

We could adopt the truncate-style logic from 2989c38245628e1ed0062f1a345da0693f4f294d to strip out the rest of the paragraph, but what does contentWithoutSummary become?

contentWithoutSummary = "<p><h3>Title</h3></p>\n\n<p>foo</p>"

Not sure what the use-case is for contentWithoutSummary.

Not sure what the use-case is for contentWithoutSummary.

It is to be able to ... show the content without summary.

Delimiter not interpreted unless you put a newline before and after, as shown in the commit above

-> not working https://github.com/arduino/glossary-content/blob/master/en/AREF.adoc

-> this works:
```
= AREF

Analog REFerence: the reference max voltage for the Analog to Digital converter.

Changing the AREF allows to use the resolution of the ADC at its best, especially for low voltages. Usually AREF can't be greater than the supply voltage of the ADC circuit.
```
but it changes also the complete page view