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
Case sensitivity with file extensions affects syntax highlighting #11327
Comments
Thanks for reporting! Please see #13007 for progress on this :) |
Closing as duplicate of #13007 - will look into this soon. |
slimsag
added a commit
that referenced
this issue
Nov 23, 2020
…ng to syntect_server syntect_server expects lowercase filepath extensions only in https://github.com/sourcegraph/syntect_server#supported-file-extensions technically, it is being correct here because the actual syntax definitions describe exactly which file extensions they should match in a case sensitive manner. However, in practice this is not ideal because there is not usually an overlap of case-sensitivity in file extensions describing different syntaxes, and it is somewhat common for users to find they have e.g. `.CPP` and `.cpp` files for whatever reason in their repos. Thus, we lowercase file extensions before sending the request to syntect_server. Fixes #13007 Fixes #11327
slimsag
added a commit
that referenced
this issue
Nov 24, 2020
…ing to syntect_server (#16096) * internal/highlight: always normalize filepath extensions before sending to syntect_server syntect_server expects lowercase filepath extensions only in https://github.com/sourcegraph/syntect_server#supported-file-extensions technically, it is being correct here because the actual syntax definitions describe exactly which file extensions they should match in a case sensitive manner. However, in practice this is not ideal because there is not usually an overlap of case-sensitivity in file extensions describing different syntaxes, and it is somewhat common for users to find they have e.g. `.CPP` and `.cpp` files for whatever reason in their repos. Thus, we lowercase file extensions before sending the request to syntect_server. Fixes #13007 Fixes #11327
@Bobloblaw74329479279 Just wanted to let you know, this has been fixed in the latest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps to reproduce:
Expected behavior:
The source file should be colorful and have syntax highlighting.
Actual behavior:
The entire source file is all gray. Sourcegraph needs to do a case insensitive check on the extension to determine the correct language for syntax highlighting.
The text was updated successfully, but these errors were encountered: