Maybe a stupid Q - i assume there is a good reason - most likely related to syntax clash…
Why is this not a component?
as in:
<Markdown> Text </Markdown>
Why is this not a component?
as in:
<Markdown> Text </Markdown>
I think more importantly it allows you to use JSX inside of your Markdown, and use custom React components in place of normal HTML elements that Markdown would normally emit.
I like the idea of a <Markdown> component though.
Personally, I don't see much need for handling this at compile-time, but it is what it is, and runtime rendering is a different thing entirely.
The interesting thing here is that it is inline.
edit: No judgement if being inline is a pro or a con. Personally I prefer to keep it in a specific component, but I see the appeal fo this