Awright, let's see how TypePad's parser handles inline block elements. First, a word about the mechanics of these things.
The two sentences above were keyed into TypePad's "Compose a New Post" textarea with no markup embedded by me. Since I didn't specify any markup, TypePad should be assuming the text block is a paragraph, and be sniffing for paragraph's end. The signal should be a pair of newlines or the occurrence of a new block-level element that I've keyed. Along the way it should transform single linefeeds into <br />s. There's one following this phrase
How'd we do?
Good. Single and double newlines generated <p>s and <br />s just as hoped. Hold it. That's an open <br>. Keep holding it. This is weird. Firebird/Win lets the user View Page Source but also to View Selection Source. Page source shows a well-formed <br /> but Selection Source a malformed <br>. Wassupwitdat? Anyhow, TypePad gets a pass.
Now to test the embedded block-level element trigger, first when one follows a single linefeed. Here's an explicit paragraph after a linefeed:
Hi, sailor.
… then another linefeed, and we're back. How'd we do?
Not so good. TP evidently always treats a single linefeed as a <br />, and didn't sniff-out my new, explicit paragraph — thereby knowing to close the prior one. It's not a deal breaker: users simply have to understand that behavior, which, I'll guess, is "It takes two linefeeds to signal that the prior paragraph should be closed." Like so:
Wanna party?
That should be valid. But it ain't. TP nested my explicit paragraph in one of its own. What's this mean? Can't apply inline styles to individual paragraphs, not simply. How about with a <div> wrapper?
I love you longtime
Well?
Now that's just plain weird. TP sniffed my <div>, let it through (natch) and didn't wrap it in a <p>. It looks ahead for some hand-coded elements but not others, specifically <p>s. Wonder why.
Now for a table. This one will have linefeeds between the table sub-elements, 'cause the thing's unreadable without them.
Test Table
|
Column 1
|
Column 2
|
Column 3
|
| A1 |
B1 |
C1 |
| A2 |
B2 |
K9 (heh) |
Perfect. TP knew not to litter the <table> markup with <br />s
TP can handle <blockquote>s without fouling the markup. Here's proof:
Here's a <blockquote>
We also know that it handles lists and nested lists. So it seems that the TP parser's lookahead is sniffing explicitly marked-up block elements except for <p>. Mysterious. To my mind that's a bug.
Moreover, while it's obvious to me that two newlines trigger the look-behind for open block-level elements, that behavior should be stated: Not everyone will assume it.