3 ms·
They mention xml quite early but bury how you’d do markup inside a text. Basically you can’t do it, but there is a convention to work around it. > If the eleme
by wodenokoto 5y ago
They mention xml quite early but bury how you’d do markup inside a text. Basically you can’t do it, but there is a convention to work around it.
> If the element contains mixed text and element children, the text can be encoded as a KDL node with the name - with a single string unnamed argument. For example, the XML
<span>some <b>bold</b> text</span>
> can be encoded as
span { - "some "; b "bold"; - " text" }.
- cormacrelf 5y agoI'm pretty sure that's invalid KDL, despite appearing in the XML-in-KDL document. Both the grammar and kdl-rs appear to require a trailing semicolon before the close brace. I think this might be a bug in one of the specs.