Problem
{{ data.content }} interpolates a string as escaped text. It does not call parseMarkdown.
CMS / DB templates often store a markdown string and need it parsed and rendered at render time:
::include{:value="data.content"}
::
Today each host must register its own component. That repeats the same pattern in HTML, Vue, React, Svelte, Angular, ANSI, etc.
Alternatively, we could have a three-bracket syntax: {{{ data.content }}} to render as markdown? That would be more ergonomic.
Proposal
Add an ::include (or ::embed/::render/::content/::md/::markdown/::fragment? But include seems to be more aligned to industry standards) binding component next to If and For:
- Resolve
value from Binding scope (data. / props. / …)
- Call
parseMarkdown on the string (same plugins as the parent parse, or a documented subset)
- Map the resulting nodes with the current renderer and scope
- Empty / non-string → render nothing
Same registration model as If / For: opt-in via Binding components, not a new parse-time syntax.
Happy to open a PR once the name and plugin-inheritance rules are agreed.
Problem
{{ data.content }}interpolates a string as escaped text. It does not callparseMarkdown.CMS / DB templates often store a markdown string and need it parsed and rendered at render time:
Today each host must register its own component. That repeats the same pattern in HTML, Vue, React, Svelte, Angular, ANSI, etc.
Alternatively, we could have a three-bracket syntax:
{{{ data.content }}}to render as markdown? That would be more ergonomic.Proposal
Add an
::include(or::embed/::render/::content/::md/::markdown/::fragment? But include seems to be more aligned to industry standards) binding component next toIfandFor:valuefrom Binding scope (data./props./ …)parseMarkdownon the string (same plugins as the parent parse, or a documented subset)Same registration model as
If/For: opt-in via Binding components, not a new parse-time syntax.Happy to open a PR once the name and plugin-inheritance rules are agreed.