mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-07 20:28:38 +00:00
Summary: In something like `\text {hello, world}` we want to ignore the first space but not the second. This suggests to me that perhaps we shouldn't be in text-lexing mode until we actually see the first curly brace, so this changes us to do that. Note that this disallows doing unbraced text things now; it seemed nontrivial to lex a single text character while ignoring spaces. We should probably fix it sometime, but for now we'll fall back to MathJax anyway so I'm not super concerned. We should also add a huxley test for this. Test Plan: `\text {2x 2}` rendered `2x 2` in a non-italic font. Reviewers: jack, emily Reviewed By: emily Differential Revision: http://phabricator.khanacademy.org/D9376