@jacshuo/onyx 2.6.0 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3012,8 +3012,14 @@ declare function removeAlert(id: string): void;
3012
3012
  * Parse Markdown to sanitised HTML, safe for use with `dangerouslySetInnerHTML`.
3013
3013
  *
3014
3014
  * - Uses a local `Marked` instance (does not touch the global singleton).
3015
+ * - LaTeX math expressions are extracted BEFORE Marked parses (so Marked never
3016
+ * sees `_` or `\` inside math), then restored as KaTeX HTML afterwards.
3015
3017
  * - Images are wrapped in a `<figure>` with a hidden error-state overlay.
3016
3018
  * - The output is sanitised with a lightweight allowlist approach.
3019
+ *
3020
+ * Streaming safety: only COMPLETE (closed) LaTeX expressions are extracted and
3021
+ * rendered. Incomplete expressions during streaming pass through as raw text
3022
+ * and are rendered naturally once the closing delimiter arrives.
3017
3023
  */
3018
3024
  export declare function renderMarkdown(text: string): string;
3019
3025
 
@@ -3012,8 +3012,14 @@ declare function removeAlert(id: string): void;
3012
3012
  * Parse Markdown to sanitised HTML, safe for use with `dangerouslySetInnerHTML`.
3013
3013
  *
3014
3014
  * - Uses a local `Marked` instance (does not touch the global singleton).
3015
+ * - LaTeX math expressions are extracted BEFORE Marked parses (so Marked never
3016
+ * sees `_` or `\` inside math), then restored as KaTeX HTML afterwards.
3015
3017
  * - Images are wrapped in a `<figure>` with a hidden error-state overlay.
3016
3018
  * - The output is sanitised with a lightweight allowlist approach.
3019
+ *
3020
+ * Streaming safety: only COMPLETE (closed) LaTeX expressions are extracted and
3021
+ * rendered. Incomplete expressions during streaming pass through as raw text
3022
+ * and are rendered naturally once the closing delimiter arrives.
3017
3023
  */
3018
3024
  export declare function renderMarkdown(text: string): string;
3019
3025