You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
two linebreaks are converted to paragraph
To Reproduce
Steps to reproduce the behavior:
Use either block classic or block paragraph (I did not test other blocks, so also other blocks could have this behavior)
write something.
insert 2x <br> (two linebreaks, hit strg/control+enter/return)
write something in the new line
see html-code, should be -> <p> text <br><br> text </p>
preview in frontend or publish and view post in frontend
see source code = should be <p> text <br><br> text </p> but is <p> text </p><p> text </p>
Expected behavior
Two linebreaks instead of paragraph is sometimes essential. E. g. in block paragraph, when you use the initial letter and set a background for the block paragraph. Since the second part is converted to a paragraph it will be separated, will have no background and does not flow around the inital letter.
Desktop (please complete the following information):
Sorry, I was to fast.
It is half fixed. In Block Paragraph the two line breaks <br><br> don't change anymore (what is good)
but in Block Classic the two line breaks are converted to <p></p>
I tested with WordPress 4.9.8, Gutenberg 4.3, and the Twenty Seventeen 1.7 theme using Chrome 70.0.3538.77 on macOS 10.13.6 and couldn't replicate linebreaks getting converted to paragraphs. (46s)
May I ask whether you tested with WP4.9.8 or only with WP5.0-beta? May I ask what theme you used during testing and whether you know if the theme calls any filters or actions for wpautop or if you have any other plugins installed which might be doing that?
WordPress (5.0-beta3-43891) and also with the new 5.0-beta4-43896
Theme Twenty Nineteen
No other plugins, only betatester
Insert Block Classic, write text, hit twice strg + enter, write text
switch to HTML view
switch to visuel view
switch to HTML view, it is okay = 1 paragraph with 2 br-tags
Hit publish or update button, refresh page, switch to HTML-view, now there are 2 paragraphs
The bug persists with WP (5.0-beta5-43907), Theme Twenty Nineteen
One change: Instead of converting it to 1 paragraph, the 2 lines are converted into 2 paragraphs.
I tested with WordPress 4.9.8 with and without and Gutenberg 4.6.1 as well as with WordPress 5.0-RC2-43958.
In WP 4.9.8 + Gutenberg 4.6.1 with the classic block, line breaks became paragraphs on publish but did not become paragraphs when switching back and forth between "Edit in HTML" and "Edit visually".
In WP 5.0-RC2-43958, I found the same behavior as WP 4.9.8+ Gutenberg 4.6.1.
In WP 4.9.8 with the classic editor, line breaks became paragraphs when I switched from Text to Visual mode. I also noticed line breaks collapsed and became paragraphs on the front end even if I could see extra spacing in the editor.
Video: 1m28s Tested using the classic block with WP 4.9.8 + Gutenberg 4.6.1 then the classic editor with WP 4.9.8 and no Gutenberg. Twenty Fifteen theme.
To be honest, I am not 100% sure what the expected behavior is supposed to be so I will add the [Type] Question label.
you are right. No idea, if this had another behavior in prior versions of WordPress (<4.9.8). However, also in WP without Gutenberg the linebreaks are converted to paragraph.
Activity
[-]2 Linebreads are converted to paragraph[/-][+]2 Linebreaks are converted to paragraph[/+]La-Geek commentedon Nov 11, 2018
The bug is fixed in WP 5.0-beta3-43883
La-Geek commentedon Nov 11, 2018
Sorry, I was to fast.
It is half fixed. In Block Paragraph the two line breaks
<br><br>don't change anymore (what is good)but in Block Classic the two line breaks are converted to
<p></p>designsimply commentedon Nov 12, 2018
I tested with WordPress 4.9.8, Gutenberg 4.3, and the Twenty Seventeen 1.7 theme using Chrome 70.0.3538.77 on macOS 10.13.6 and couldn't replicate linebreaks getting converted to paragraphs. (46s)
May I ask whether you tested with WP4.9.8 or only with WP5.0-beta? May I ask what theme you used during testing and whether you know if the theme calls any filters or actions for
wpautopor if you have any other plugins installed which might be doing that?La-Geek commentedon Nov 13, 2018
WordPress (5.0-beta3-43891) and also with the new 5.0-beta4-43896
Theme Twenty Nineteen
No other plugins, only betatester
Insert Block Classic, write text, hit twice strg + enter, write text
switch to HTML view
switch to visuel view
switch to HTML view, it is okay = 1 paragraph with 2 br-tags
Hit publish or update button, refresh page, switch to HTML-view, now there are 2 paragraphs
La-Geek commentedon Nov 17, 2018
The bug persists with WP (5.0-beta5-43907), Theme Twenty Nineteen
One change: Instead of converting it to 1 paragraph, the 2 lines are converted into 2 paragraphs.
designsimply commentedon Dec 1, 2018
I tested with WordPress 4.9.8 with and without and Gutenberg 4.6.1 as well as with WordPress 5.0-RC2-43958.
Video: 1m28s
Tested using the classic block with WP 4.9.8 + Gutenberg 4.6.1 then the classic editor with WP 4.9.8 and no Gutenberg. Twenty Fifteen theme.
To be honest, I am not 100% sure what the expected behavior is supposed to be so I will add the
[Type] Questionlabel.La-Geek commentedon Dec 2, 2018
you are right. No idea, if this had another behavior in prior versions of WordPress (<4.9.8). However, also in WP without Gutenberg the linebreaks are converted to paragraph.