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

Syntax highlighting of JavaScript is different under 0.83.1 as compared to 0.82.0 #8532

Closed
chalin opened this issue May 13, 2021 · 6 comments · Fixed by #9053
Closed

Syntax highlighting of JavaScript is different under 0.83.1 as compared to 0.82.0 #8532

chalin opened this issue May 13, 2021 · 6 comments · Fixed by #9053

Comments

@chalin
Copy link
Contributor

chalin commented May 13, 2021

After upgrading to Hugo v0.83.1 (+extended darwin/amd64) from 0.82.0, I've noticed that leading underscores in JavaScript variable names are formatted differently.

For example, consider this code:

var PROTO_PATH = __dirname + '/../../../protos/route_guide.proto';

This is the appearance when built with Hugo 0.83.1:

Notice how the color of the leading underscore characters (__) differs from the color of the rest of the identifier __dirname.

cc @nate-double-u

@chalin
Copy link
Contributor Author

chalin commented May 14, 2021

The config file for the project I'm observing this for is here: https://github.com/grpc/grpc.io/blob/main/config.yaml. The only difference relative to the highlighting defaults, is that the style is set to manni.

@jmooring
Copy link
Member

jmooring commented May 14, 2021

We updated the chroma syntax highlighter from v0.8.2 to v0.9.1.

I think this is the change that is causing the problem:

alecthomas/chroma@881d54f#diff-12f3e5a2dbe731b9b91b6e604b0f7e1b8928ae8ceaee52b7f014752b25d82005L33-R33

cc/ @alecthomas

@bep bep added the Upstream label May 14, 2021
@bep bep added this to the v0.84 milestone May 14, 2021
@bep bep added the Bug label May 14, 2021
@bep
Copy link
Member

bep commented May 14, 2021

To get a fix for this, you need to open up an issue in the Chroma issue tracker: https://github.com/alecthomas/chroma/issues

@chalin
Copy link
Contributor Author

chalin commented May 14, 2021

Done: alecthomas/chroma#507

@bep bep modified the milestones: v0.84, v0.85 Jun 18, 2021
@bep bep modified the milestones: v0.85, v0.86 Jul 5, 2021
@bep bep modified the milestones: v0.86, v0.87, v0.88 Jul 26, 2021
@bep bep modified the milestones: v0.88, v0.89 Sep 2, 2021
@chalin
Copy link
Contributor Author

chalin commented Oct 17, 2021

Done: alecthomas/chroma#507

And now released! Release https://github.com/alecthomas/chroma/releases/tag/v0.9.4:

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants