It takes too many newlines to create a line break after a card image
Posted: Thu Mar 03, 2022 8:38 pm
I'm borrowing @Neige's street fighter cards for this bug report since it's occuring in his street fighter boss thread. I'm going to demonstrate the problem, you may want to quote this post and inspect its bbcode to see what I'm going on about here.
Here's a ccimg tag with zero line breaks before the text.
One line break before the text... but this text is still on the same line as the image for some reason.
Two line breaks before the text. It's still on the same line. Why??
Three line breaks before the text. Now there's an actual new line as you read this.
For good measure, here's one with four line breaks before the text. After the third, the line breaks start behaving like normal.
It shouldn't require putting three whole linebreaks in the editor to get just one linebreak in the view. It should require only one linebreak in the editor to get one in the view.
It's not even some weird layout issue like the image is using float: left; or something like that — the bbcode parser itself is eating up the first two line breaks and completely ignoring them until I put three of them together and then it starts giving me <br> elements.
In this screenshot of my DOM inspector, note the total lack of <br> elements after the div in the "two new lines" example, and the highlighted singular <br> inserted in the "three line breaks" example.
Here's a ccimg tag with zero line breaks before the text.
One line break before the text... but this text is still on the same line as the image for some reason.
Two line breaks before the text. It's still on the same line. Why??
Three line breaks before the text. Now there's an actual new line as you read this.
For good measure, here's one with four line breaks before the text. After the third, the line breaks start behaving like normal.
It shouldn't require putting three whole linebreaks in the editor to get just one linebreak in the view. It should require only one linebreak in the editor to get one in the view.
It's not even some weird layout issue like the image is using float: left; or something like that — the bbcode parser itself is eating up the first two line breaks and completely ignoring them until I put three of them together and then it starts giving me <br> elements.
In this screenshot of my DOM inspector, note the total lack of <br> elements after the div in the "two new lines" example, and the highlighted singular <br> inserted in the "three line breaks" example.