I agree that avoiding hardcoding tag names is a worthy goal.
Clarification required
An HTML block would start with a line containing a single, unindented tag (either opening, closing, or self-closing), and would end, as before, with a blank line or end of document.
Can you please clarify if “containing a single” is supposed to mean:
a. containing only a single complete unindented tag (and nothing else);
b. containing only a single complete unindented tag or a partial unindented tag, but not both;
c. containing at least a single complete unindented tag;
d. containing either only a single partial unindented tag or least a single complete unindented tag; or both.
Version 0.15 seems to be (d). Since <div></div>
in Example 100 is treated as a valid start of a HTML block (even though it has more than just one tag) and incomplete tags are also a valid start of a HTML block in Example 107.
If the new proposal is (d) or (b) then there is no problem with the YouTube iframe
example, since it is a valid partial tag. The iframe
example is only a problem if partial tags cannot be a valid HTML block tag (i.e. (a) or (c)).
Examples
To make the above options more clear, here are some example lines.
Under (a):
<div>
would be a valid beginning of a HTML block.
<div></div>
would be invalid, since it is not a single tag (it is two tags)
<div class="foo"
would be invalid, since it is not a complete tag.
<div><p class="bar"
would be invalid, since there is more than a single tag.
Under (b):
<div>
would be a valid.
<div></div>
would be invalid, since it is not a single tag (it is two tags).
<div class="foo"
would be valid.
<div><p class="bar"
would be invalid, since there is both a single complete tag and a partial unindented tag, but only one is allowed.
Under (c):
<div>
would be a valid.
<div></div>
would be valid.
<div class="foo"
would be invalid, since it is not a complete tag.
<div><p class="bar"
would be valid.
Under (d):
<div>
would be a valid.
<div></div>
would be valid.
<div class="foo"
would be valid.
<div><p class="bar"
would be valid.
A preference
I prefer the options that allow for more than “only a single complete tag”, since there are situations where you want HTML tags to not contain any whitespace content. When you really want to produce <foo></foo>
or <foo/>
and don’t want <foo> </foo>
or
<foo>
</foo>
A question
I don’t understand why, in example 1 of the 6th post, <del>foo</del>
becomes <p><del>foo</del></p>
?
If this is not being interpreted as a HTML block (because it contains more than a single tag) and so is treated as a paragraph, wouldn’t the special characters be treated as normal characters (since they cannot be interpreted as autolinks). So, if it is transformed into HTML, it would become <p><del>foo</del></p>
.