Up to one line ending in inline raw's open and closing tag

In the spec we have:

An open tag consists of a < character, a tag name, zero or more attributes, optional spaces, tabs, and up to one line ending, an optional / character, and a > character.

A closing tag consists of the string </, a tag name, optional spaces, tabs, and up to one line ending, and the character >.

Somehow except for a self-closing tag:

> printf "Ha <a\n/>" | cmark --unsafe
<p>Ha <a
/></p>

These “up to one line ending” get recognized during block processing as blockquotes:

> printf "Ha <a\n>" | cmark --unsafe 
<p>Ha &lt;a</p>
<blockquote>
</blockquote>
> printf "Ha </a\n>" | cmark --unsafe
<p>Ha &lt;/a</p>
<blockquote>
</blockquote>

Is there an actual setting in which that will not happen ?

Also somehow it seems a bit incompatible with rule 7 of HTML blocks:

  1. Start condition: line begins with a complete open tag (with any tag name other than pre , script , style , or textarea ) or a complete closing tag, followed by zero or more spaces and tabs, followed by the end of the line.

It seems these open and close tags are not allowed to span more than one line in the same way (i.e. only self-closing tag work).

Yes,

% printf "Ha <a\n     >" | cmark --unsafe
<p>Ha <a
></p>

But remember, block structure takes precedence over inline structure and blocks are discerned before inlines are parsed at all.

It seems these open and close tags are not allowed to span more than one line in the same way (i.e. only self-closing tag work).

Not for rule 7 – that’s the point of “complete.” So there’s no inconsistency here.

Of course, silly me !

Ok thanks. These “complete” didn’t really click with me. Something like “line begins with an open tag which ends on the same line” would be clearer to me.

@jgm also
On system with php installed, there is no cmark