You have a mistake in your algorithm for creating paragraphs from <br><br>. You create paragraphs at each <br> except the first in an element.
The code of the selected example is the following: "Дни стояли сизые, косые.<br> Непогода улицы мела.<br> Родилась я осенью в России,<br> И меня Россия приняла.<br>"
In your IV, the first <br> in the poem stays <br>, and the following are replaced with paragraphs.
My guess is that you use something like @split_parent: $body//p/br/next-sibling::br
This ignores text nodes. You can use "following-sibling" instead of "next-sibling" to make them counted.
I cited an article from Dec 2017 because it's easy to demonstrate here (a poem), but this in fact happens in really many articles (here's a yesterday's one: http://www.teatral-online.ru/news/24163/). And since you violently alter the layout for no reason (and even do in inconsistently, keeping one break after the first <br>), I believe this issue is pretty serious.
Log in here to create Instant View templates. Please enter your phone number in the international format and we will send a confirmation message to your account via Telegram.
The code of the selected example is the following:
"Дни стояли сизые, косые.<br>
Непогода улицы мела.<br>
Родилась я осенью в России,<br>
И меня Россия приняла.<br>"
In your IV, the first <br> in the poem stays <br>, and the following are replaced with paragraphs.
My guess is that you use something like
@split_parent: $body//p/br/next-sibling::br
This ignores text nodes. You can use "following-sibling" instead of "next-sibling" to make them counted.
I cited an article from Dec 2017 because it's easy to demonstrate here (a poem), but this in fact happens in really many articles (here's a yesterday's one: http://www.teatral-online.ru/news/24163/). And since you violently alter the layout for no reason (and even do in inconsistently, keeping one break after the first <br>), I believe this issue is pretty serious.