Switching from HTML to Visual editor removes some line breaks inside PRE
|Reported by:||mrclay||Owned by:|
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.
Change History (14)
comment:1 SergeyBiryukov — 2 years ago
- Milestone Awaiting Review deleted
- Resolution set to duplicate
- Status changed from new to closed
comment:3 SergeyBiryukov — 2 years ago
- Milestone set to Awaiting Review
- Resolution duplicate deleted
- Status changed from closed to reopened