Reference · SemText · Disclosure & views
<sem-source>
SemText element
You put ordinary SemText inside. The reader sees the rendered result, then the exact source that produced it. Made for documents that teach the vocabulary.
Example
Live render boots with JavaScript — the authored source is alongside.
variant: authored view-as="source" — the section opens in source mode
An authored `view-as="source"` (either spelling) builds the fence at enhance time and starts in source mode; the rendered children stay one click away and the fence is built once, then only shown and hidden. JS-off the children render as ordinary flow — the hide rule is gated on the upgrade marker, so nothing authored-visible is ever hidden without scripts.
Live render boots with JavaScript — the authored source is alongside.
variant: no label — the chrome without a caption
`label` is optional: the chrome then shows only the Rendered/Source pair. The wrapper still mints nothing — this paragraph extracts as if the wrapper were not there, and with scripts off it is the whole story.
Live render boots with JavaScript — the authored source is alongside.
variant: authoring error — nested wrappers
A `sem-source` must not nest inside another: the snapshot pass skips the inner wrapper with a console warning and the outer wrapper owns the section, so the inner chrome is undefined and must not be relied on. The fence of the outer wrapper contains the inner wrapper's markup verbatim — which is why the inner one must not toggle. Fix the document: one wrapper per section.
Live render boots with JavaScript — the authored source is alongside.
Source: spec/schema/sem-source.md