Skip to content

Conversation

@mikehaverstock
Copy link
Member

@mikehaverstock mikehaverstock commented Oct 31, 2025

I think I tracked down this extra space behavior to here:
ac49870

It was a very long time ago and there's not a good description or tests associated with this commit. My hope is that because this was such an old version of mathquill it was necessary before but isn't necessary anymore. And maybe this pattern proliferated. One thing that gives me this hope is that there's a comparison to '\\int ' (with a trailing space) here:
ac49870#diff-7e892af2c012f89c5208ddb22a30e32945144e1d3691ce7c4821d5fa30a73bc6R36

Hoping that this was early enough that handling of space wasn't super robust. And maybe over time handling of space improved so this isn't necessary anymore.

The part that makes me think this probably isn't strictly necessary is that there's already internal code that consumes empty blocks. There's no space in the this \sqrt{} fragment:
https://github.com/desmosinc/mathquill/blob/main/src/commands/math/basicSymbols.ts#L1184

@mikehaverstock mikehaverstock force-pushed the mike/stop-writing-extra-spaces branch from 4184df0 to 7028c81 Compare November 3, 2025 15:09
@mikehaverstock mikehaverstock force-pushed the mike/stop-writing-extra-spaces branch from 7028c81 to adb3674 Compare November 3, 2025 15:34
@mikehaverstock mikehaverstock marked this pull request as ready for review November 3, 2025 17:56
Copy link

@jared-hughes jared-hughes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I don't see any reason why this would break something.

Nice work tracking it down to that commit. It's so old that I agree it might be working around some old bug.

@mikehaverstock mikehaverstock merged commit 5fabd11 into main Nov 3, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants