Thoughts on changing supported html syntax to include the dangling closing angle bracket?

Came up here: Is there a way to allow multi-line HTML to be retained? · remarkjs · Discussion #676 · GitHub


For example, I’m seeing:

<a
  href="..."
  target="_blank"
  rel="noopener"
  data-test="my-link"
>  
  some text
</a>

Reproduction: AST explorer

The issue: the dangling angle bracket is interpreted as a blockquote:

I know that in commonmark today, this is intended, but it was pretty surprising behavior to me, especially since there was an unclosed opening html tag immediately above.

What are people’s thoughts on supporting this style of tag definition? This would also coincidentally help out authors of MDX or MDX-like behaviors (I’m working on a playground for glimmer/ember, atm)


Oh, I want to add that for consistency, since a dangling /> is supported, I think it makes sense for > to be supported as well.

1 Like