[wp-trac] [WordPress Trac] #19666: Switching from HTML to Visual editor removes some line breaks inside PRE
WordPress Trac
wp-trac at lists.automattic.com
Sun Dec 25 21:34:59 UTC 2011
#19666: Switching from HTML to Visual editor removes some line breaks inside PRE
--------------------------+-----------------------------
Reporter: mrclay | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version:
Severity: normal | Keywords:
--------------------------+-----------------------------
All line breaks inside PRE elements used to transmit correctly when
switching editor mode from HTML to Visual. Around WP3.1 or so, line breaks
started to be removed if they happened to be inside an inline element. The
common use case is a single CODE element in a PRE element:
{{{
<pre><code>Line 1
Line 2
Line 3</code></pre>
}}}
The above markup used to be handled correctly when switching between
editor modes in either direction, but now the line breaks are converted to
spaces when switching from HTML to Visual mode.
Many users have posts with a single CODE inside PRE, as it's semantically
correct for source code, and is the convention required to support some
syntax highlighters like Chili.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19666>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list