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

File extensions are not 1:1 unique with languages #11

Open
ianlewis opened this issue Aug 30, 2023 · 0 comments
Open

File extensions are not 1:1 unique with languages #11

ianlewis opened this issue Aug 30, 2023 · 0 comments

Comments

@ianlewis
Copy link

For example, the .ts file extension is used by TypeScript as well as QT translation files which are in XML format.

The languages.yml file includes this for both languages but linguist internally links extensions to languages using a map. This will result in the last entry added to the map winning.

Currently LanguageByFilename returns a string. We should probably deprecate it and introduce a version of this function that returns a list of matching languages.

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

No branches or pull requests

1 participant