yera.runtime.handlers.markdown.htmx
Streaming markdown handler for the HTMX target.
Symbols
HTMXMarkdownHandler
BaseHTMXHandlerRender a streaming Markdown block through incremental morph swaps.
Settled Markdown prefixes are committed as immutable segments while the live tail is repeatedly rendered and replaced. A trailing table is rendered through the shared Markdown renderer as soon as its header and delimiter are complete, while an unfinished final row is withheld until more input arrives. This keeps streaming output stable without giving tables, mathematics, or other inline Markdown a separate rendering path.
Methods
HTMXMarkdownHandler.__exit__
__exit__(
exc_type: type[BaseException] | None,
exc_val: BaseException | None,
exc_tb: TracebackType | None,
)Flush the tail unthrottled and unconditionally.
The last chunk's swap may have been coalesced away, and
render_streaming_markdown holds back an in-progress table row that
only a full render releases.
HTMXMarkdownHandler.push
push(
event: OutputEvent,
) → NoneAppend a chunk; publish at most one swap every _MIN_FRAME_S.
Parameters
An output event carrying MarkdownData.
Raises
If the event data is not MarkdownData.