mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-08 23:54:39 +00:00
Posts that use the common dollar-delimiter convention (e.g. the math-academy "Linear Independence" note) now render their formulas as real equations instead of raw LaTeX text. - commons: new MathParser tokenizes a line into atomic math spans (kept whole, since they contain spaces) interleaved with plain text, following the pandoc/remark-math dollar rules so currency like "$5 and $10" and escaped "\$" don't false-fire. New MathSegment carries the inner LaTeX + display flag through the rich-text pipeline. - RichTextParser splits math out before the whitespace word-splitter when a line might contain math; non-math lines keep the existing path. - amethyst: LatexEquation renders a MathSegment via JLaTeXMath, tinted to the current text color and sized to the font, with a raw-text fallback when the formula fails to parse. Wired into both the preview and no-preview render paths of RichTextViewer. Scope: dollar delimiters only, regular (non-markdown) render path. https://claude.ai/code/session_01N8ZhVv9912DLGNJiErVTR4