Putting something else on the same line as a custom component makes it disappear. for example if you edit dioxus-markdown/examples/custom-components/src/main.rs
so that:
<Counter initial="5"/>
becomes:
<Counter initial="5"/> x
the resulting rendering is just "x".
Additionally if you modify the input to include two custom components in a row, for example:
<Counter initial="5"/>
<Counter initial="5"/>
it panics.
I think custom should work inline, and not crash if they are on subsequent lines.
Looking at Common Mar's reference implementation for this case we can clearly see that it should work. See the html view there.
I think the correct behavior is to basically emit what common mark's implementation does, except that when a tag has a name which is a custom component, the custom component should be used instead.
Putting something else on the same line as a custom component makes it disappear. for example if you edit dioxus-markdown/examples/custom-components/src/main.rs
so that:
becomes:
the resulting rendering is just "x".
Additionally if you modify the input to include two custom components in a row, for example:
it panics.
I think custom should work inline, and not crash if they are on subsequent lines.
Looking at Common Mar's reference implementation for this case we can clearly see that it should work. See the html view there.
I think the correct behavior is to basically emit what common mark's implementation does, except that when a tag has a name which is a custom component, the custom component should be used instead.