Testing whether a Vue component can alter the child text content, including nested tags:
Hello, text →
<to-uppercase>foobar <b>bar</b></to-uppercase>
← is altered to be uppercase.
This could be useful for localization tags or for markdown or other markup inside text. Let's try syntax highlighting:
To make it work for children, I used the cloneVnode function from LinusBorg's fiddle[1]. There are probably subtleties I'm missing. It seems to work with event handlers: