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? · Discussion #676 · remarkjs/remark · 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.

https://astexplorer.net/#/gist/f2ab347d07a755a861506e32cde2c652/9ab1d6cdef240e4d7285bd1f064c9c5c85047628

2 Likes