GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||
GeezerVison is showing github.com — fix(ui): render $..$ and same-line $$..$$ math by wulart · Pull Request #51989 · anomalyco/opencode Conversation
|
|
The following comment was made by an LLM, it may be inaccurate: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…malyco#51981) Co-authored-by: rekram1-node <[email protected]>
The katex extension only recognized \(...\) inline math and block math
requiring newlines right after the opening $$ and before the closing $$.
Most LLM chat output uses $..$ for inline math and single-line $$..$$
for display math, so those formulas currently render as raw source.
Extend the existing extension rather than adding a new one:
- inline: try $..$ after \(...\) fails, with display mode for $$..$$
- block: accept single-line and same-line $$..$$ alongside the existing
newline-delimited form
- start hints: report the earliest $ for inline math and \n$$ for block
math so marked can split paragraphs around glued display math
Currency guards keep money amounts as plain text: the opening $ must
not be followed by whitespace, the closing $ must not be preceded by
whitespace nor followed by a digit, and the content cannot contain $
or newlines ("costs $5 and $10", "$1,000 to $2,000" stay literal).
Unclosed delimiters are left as text; invalid latex renders as an
inline error via the existing throwOnError:false path.
Co-Authored-By: Claude Code <[email protected]>
bcd31a7 to
ad24d62
Compare
|
Retargeting to the v2 line where merges are landing — superseded by #52087. The gap exists identically on v2 (its katex extension also only matches (...)). |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
chat: LaTeX math ($...$) is not rendered in messages
There was an error while loading. Please reload this page.