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

First TeX command is not recognized if last line contains comment #200

Closed
muzimuzhi opened this issue Dec 28, 2023 · 3 comments
Closed

First TeX command is not recognized if last line contains comment #200

muzimuzhi opened this issue Dec 28, 2023 · 3 comments
Labels

Comments

@muzimuzhi
Copy link
Contributor

muzimuzhi commented Dec 28, 2023

Recently I find on GitHub.com, in rendered markdown, in a fenced code block highlighted with tex language (```tex), if the previous line contains TeX comment (% followed by none or more characters), then the first command on current line is not recognized as TeX command any more.

But if current line contains leading space(s), then the highlighting for first command is repaired.

\relax \relax
%
\relax \relax
%
 \relax \relax

image

The only change made to the most recent release of https://github.com/github-linguist/linguist (see github-linguist/linguist#6627) was my three commits that altered list of TeX primitives (8e47254...0be3da8). They are most likely the culprit, but I can't find the reason.

Maybe that's controlled by other repositories, for instance https://github.com/github/markup. But the most recent commit in that repo was two months ago...

@muzimuzhi muzimuzhi changed the title First command is not recognized if last line ends with comment First TeX command is not recognized if last line contains comment Dec 28, 2023
@sanssecours
Copy link
Member

Thank you for the bug report. I do not think the problem you describe has anything to do with the updates to the TeX grammar in this Bundle. At least in TextMate everything seems to work as expected. I tried the following:

  1. Open TextMate

  2. Create a new file ( + N)

  3. Change the syntax to TeX: Choose “TeX” in the second column of the status bar

  4. Past the following text:

    \relax \relax
    %
    \relax \relax
    %
    \relax \relax
    

You can see the output on my machine in the following screenshot:

TeX Highlighting

@sanssecours sanssecours added the Bug label Jan 7, 2024
@muzimuzhi
Copy link
Contributor Author

Thank you for sharing the (positive) info!

Then I think I will report this to a more general place which is closer to GitHub team.

@muzimuzhi
Copy link
Contributor Author

I didn't report it elsewhere but it seems the issue is now fixed.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants