Opened 17 years ago
Closed 16 years ago
#7511 closed defect (bug) (invalid)
Code tags get messed up
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.6 |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
Wordpress doesn't like empty lines between code tags.
<code> a b c </code>
Turns into:
<code> a</code> b c
Change History (7)
#1
@
16 years ago
- Milestone 2.6.1 deleted
- Resolution set to invalid
- Status changed from new to closed
#2
follow-up:
↓ 3
@
16 years ago
- Resolution invalid deleted
- Status changed from closed to reopened
The fact that newlines aren't preserved means
<code>
a
b
c
</code>
could reasonably become
<code>a b c</code>
but not
<code>a</code> b c
as the original description has.
#3
in reply to:
↑ 2
@
16 years ago
- Component changed from TinyMCE to General
- Resolution set to invalid
- Status changed from reopened to closed
When using the HTML editor pressing Enter once would insert BR tag, pressing it twice would insert P tag. Since you can't wrap paragraphs in <code>, it is limited only to the first paragraph.
If you want to stop converting new lines to paragraphs, you will have to turn off autop (not recommended).
#4
@
16 years ago
- Resolution invalid deleted
- Status changed from closed to reopened
Shouldn't the converter recognise when it is inside a <code>
element and not convert newlines to <p>
s inside it?
Note: See
TracTickets for help on using
tickets.
<code> is an "inline" tag, like <strong> and <em>. More details:
Phrase elements: EM, STRONG, DFN, CODE, SAMP, KBD, VAR, CITE, ABBR, and ACRONYM
http://www.w3.org/TR/html401/struct/text.html#h-9.2.1
According to the W3C specification blank spaces and line breaks are ignored in it. The only tag that preserves them is the <pre> tag and that is working well in both editors and autop.