Get all the preview that I've defined in the Post.
If I define a More Tag right after an element like a <ul> or <img> the post preview will only show my last <p> element and will ignore all later elements.
So I'm forced to write all tags:
{{ post.preview.read_more(false).strip('<div><p><ul><ol><li><a><img>') }}
<p></p>
<p></p>
<ul></ul>
<!--more -->
<p></p>
{{ post.preview.read_more(false).strip(false) }}
After some testing the problem seems to be on this line:
https://github.com/timber/timber/blob/2cdb07fdd2baa05907d5457f4e621549540f427e/lib/PostPreview.php#L229
Same issue here.
@claudiopedrom yes you're right about where is the problem.
I think that now, when many of us is using the Gutenberg editor the chance when we'll end the text in more with something else than </p> are much greater than before so this rules may only cause more trouble.
I think that, for keeping everything backward compatible we should:
if ( !$this->strip && !$this->new_behaviour ) {false but if someone would prefer to change it true<!--more--> tag.@claudiopedrom @rgllm thanks for the tip and the very very helpful full description.
@palmiak does a great job of laying out steps to resolve. Given the likely change for existing behavior, I'd suggest just PR'ing this into 2.0 so we can jettison legacy support. Anyone want to claim?
@jarednova so you think we should leave version 1.x as it is and prepare just for 2.0 or prepare both versions for 1.x with legacy support and 2.x without?
I'd say let's _start_ with 2.x (without legacy support). Once there, we can port that into 1.x and add in legacy support!
Most helpful comment
@claudiopedrom yes you're right about where is the problem.
I think that now, when many of us is using the Gutenberg editor the chance when we'll end the text in more with something else than
</p>are much greater than before so this rules may only cause more trouble.I think that, for keeping everything backward compatible we should:
if ( !$this->strip && !$this->new_behaviour ) {falsebut if someone would prefer to change ittrue<!--more-->tag.