this is my setup, the solution can be in JS or CSS:
<p>
"Text"
<br>
<br>
"Text2"
<br>
<br>
<br> -> should be hidden
<br> -> should be hidden
"Text3"
</p>
I want to check every paragraph for br, if there are more than 2 br DIRECTLY following each other, then I want to hide every br (in that break section) except for the first and second br.
In other words: There is a paragraph. This p contains text, followed by two breaks - thats okay. Then there is more text in the same p, this time followed by 3 breaks. That is not okay, because the 3rd break should be hidden there. There could be more text with breaks following after that.
So in this example only the last two breaks should be hidden. Targeting the childs is not working, because then only the first and second breaks are visible but every break after that is hidden.