[wp-trac] [WordPress Trac] #43394: wpautop inserts extraneous line breaks if hard return around commented content
WordPress Trac
noreply at wordpress.org
Mon Jun 15 00:19:38 UTC 2020
#43394: wpautop inserts extraneous line breaks if hard return around commented
content
--------------------------+------------------------------
Reporter: davidshq | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Formatting | Version: 4.9.4
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Changes (by sabernhardt):
* component: General => Formatting
Comment:
@davidshq Hi and thanks for the report!
In addition to the line break tags, the comments in your example are
wrapped in a paragraph for me:
{{{
<p>Some regular content here.</p>
<p><!-- This is Important --><br />
<!-- Don't Forget This --><br />
<!-- Why are you Forgetting? --><br />
<!-- Adding individual comments for each line is --><br />
<!-- fun! --></p>
<p>Some regular content here.</p>
}}}
If no one uses the Visual editor for your site, you might want to try
combining the comments into one and indenting each line of text within it
(for now). Switching to Visual, though, would edit the comment to one
line. The comment still wraps in the paragraph tag, so this option would
only remove the line breaks.
{{{
<p>Some regular content here.</p>
<!--
This is Important
Don't Forget This
Why are you Forgetting?
Adding individual comments for each line is
fun!
-->
<p>Some regular content here.</p>
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43394#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list