mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-07 12:18:39 +00:00
Summary: The greediness of the `\color` function wasn't set correctly, leading to expressions like `\color{red}\text{a}` parsing correctly, when they shouldn't. (This is based on how MathJax parses, since TeX doesn't have a `\color` function, so MathJax is the standard). Test Plan: - Make test - See that `\color{red}\text{a}` doesn't parse (like MathJax) - See that `\color{red}{\text{a}}` does parse (like MathJax) - See that `\color{red}\frac12` doesn't parse (like MathJax) - See that `\color{red}{\frac12}` does parse (like MathJax) - See that `\red\text{a}` doesn't parse (like MathJax) - See that `\red{\text{a}}` does parse (like MathJax) - See that `\red\frac12` doesn't parse (like MathJax) - See that `\red{\frac12}` does parse (like MathJax) Reviewers: alpert Reviewed By: alpert Differential Revision: https://phabricator.khanacademy.org/D17130