Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made backslash escape starting delimiters. #3775

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

orlp
Copy link

@orlp orlp commented Jan 16, 2023

What is the previous behavior before this PR?

Backslashes before starting delimiters are treated as plain text.

What is the new behavior after this PR?

If a left delimiter is preceded by a backslash (\), the backslash is stripped and the delimiter is ignored (math mode is not entered). So \$40 is greater than \$30 gets transformed to $40 is greater than $30, if $ is configured to be a starting delimiter. If it is not, the backslashes are left untouched.

BREAKING CHANGE: The only way existing users are affected by this is if they have a backslash immediately (no whitespace or anything) followed by a delimiter that enters math mode. I can't think of any scenario where one would want that, and if one still does one can do \<span></span>$ or &bsol;$ (or a variety of other methods, zero-width spaces, etc).

Fixes #437.

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.

[auto-render] add an option to ignore \$ outside of latex expressions
1 participant