mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 00:19:26 +08:00
* fix: parse inline math in note tables and statistics notation BlockNote only renders `inlineMath` nodes, and two common shapes never became one: - `parseNoteMarkdown` converted inline `$...$` in a block's top-level content, but table cells live under `tableContent.rows`, which the walk never reached. - The normaliser treated `$Var(N)$` and `$Cov(X, Y)$` as prose because the Latin-word heuristic did not recognise statistics function names, so it escaped the delimiters as stray dollars. Recurse into `tableContent` cells and add the common statistics function names to the math-word allowlist, with regression tests for both. Co-Authored-By: Claude Code <noreply@anthropic.com> * fix(web): count statistics names as maths only when they are called "mean", "median", "rank", "span" and "var" are English words and a keyword too, so with them in the word list "$52k mean, $48k median" became a formula and a backticked `var x = 1` on a page with maths turned into KaTeX. Keep them out of MATH_WORDS and accept them only before "(", which is how Var(X) and Cov(X, Y) are written. --------- Co-authored-by: Claude Code <noreply@anthropic.com> Co-authored-by: zszz3 <91608029+zszz3@users.noreply.github.com>