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

Avoid matching \iff in syntax highlighting comment matching #2748

Closed
user202729 opened this issue Jul 3, 2023 · 2 comments
Closed

Avoid matching \iff in syntax highlighting comment matching #2748

user202729 opened this issue Jul 3, 2023 · 2 comments

Comments

@user202729
Copy link

Basically currently if there's some \iffalse ... \fi it will highlight the block as a comment, but \iffalse $ a \iff b $ \fi more content will also highlight more content as comment because it thought \iff needs to be matched.

Remark: generally TeX is not deterministically parsable anyway, but \iff is a very common case. Looking around, some less common ones are \ifcurrfiledir etc. (currfile package) or ifnot@nil (macros2e) .

@lervag
Copy link
Owner

lervag commented Jul 3, 2023

Agh, yes, TeX is hard to parse! But in this case, I believe it should not be too hard - we just need to recognize that \iff does not start a new \if ... \fi group.

lervag added a commit that referenced this issue Jul 3, 2023
@lervag
Copy link
Owner

lervag commented Jul 3, 2023

I believe this is fixed now.

@lervag lervag closed this as completed Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants