mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 17:51:57 +00:00
To determine the icon to show for a file, we need to know the language. The code previously relied on the getFileInfo API which did this using file extensions, leading to incorrect results for header files with the '.h' extension, which could have either C, C++ or Objective-C code. Instead, we now get the language from the server, where the go-enry library can optionally use the file contents to return a more appropriate result. Consequently, we can remove the getFileInfo API altogether. Updates both the React and Svelte versions of the code. Other changes in this patch: - I've added icons for a bunch of languages which were missing. - I've centralized the icon lists (and the bulk of the related logic) for both React and Svelte in one place. |
||
|---|---|---|
| .. | ||
| autoindex/config | ||
| languages | ||
| lsif | ||
| pathexistence | ||
| precise | ||
| tools | ||
| upload | ||
| CODENOTIFY | ||