Streaming buffer for chunk boundary handling in inline parsing. Buffers incomplete content at arbitrary chunk boundaries and emits at safe points using heuristics for unclosed delimiters and stale opener timeout.
| Name | Signature |
|---|---|
new | new(options) -> buffer |
new(
options) ->buffer
Create a new streaming inline buffer
Returns a buffer with feed(chunk), flush(), reset(), get_buffer(),
and set_emit(fn) methods. Options:
emit: callback function for inline events
link_refs: shared link reference definitions table
footnote_tracker: shared footnote usage tracker
stale_opener_threshold: chars before emitting unclosed opener as literal (default 50)
emit_at_word_boundary: emit at spaces when no unclosed delimiters (default true)