streaming/math_stream library

Letting a formula render while it is still arriving.

A formula is literal text until its closing delimiter lands, so a streamed \( x^2 + used to be held back whole and then appear at once when \) arrived. The maths renderer draws incomplete input — \frac{a renders the numerator it has — so the formula can instead grow with the stream: the open formula is closed for the parser, and whatever has arrived renders.

Not exported: this is the incremental view's policy, not API.

Functions

completeOpenMath(String source, {required bool dollarsAreMath}) → ({String completed, int start})?
The formula left open at the end of source, closed so that it parses.