Commit Graph

10 Commits

Author SHA1 Message Date
github-actions
afe3bdf45a Updated Linguist to v7.23.0 2023-03-03 14:07:28 +01:00
github-actions
60edc790b3 Updated Linguist to v7.21.0 2022-06-09 20:09:50 +00:00
github-actions
9f73cdf211 Updated Linguist to v7.20.0 2022-04-05 20:12:53 +00:00
github-actions
8eac4cab85 Updated Linguist to v7.19.0 2022-03-03 20:08:49 +00:00
github-actions
2febea0489 Updated Linguist to v7.18.0 2021-12-15 20:08:13 +00:00
github-actions
b3ee64f627 Updated Linguist to v7.17.0 2021-11-14 18:33:24 +01:00
Luke Francl
02878b9c9f Rename CodemirrorMode to CodeMirrorMode
It is a bit of a Rubyism to translate "CodeMirror Mode" into "codemirror_mode".
This is more in line with Go practices.
2021-10-12 16:18:33 -07:00
Luke Francl
b6b72c6c08 Add documentation to LanguageInfo struct fields
These are adapted from https://github.com/github/linguist/blob/master/lib/linguist/languages.yml
2021-10-12 16:13:59 -07:00
Luke Francl
6212f1fcb4 Remove name -> LanguageInfo mapping per code review
The GetLanguageInfo method is now implemented in terms of GetLanguageInfoByID.
This is possible because you can use GetLanguageID to get the ID for a language.
2021-10-12 13:29:39 -07:00
Luke Francl
b248b21349 Expose LanguageInfo with all Linguist data
As discussed in https://github.com/go-enry/go-enry/issues/54, this provides an
API for accessing a LanguageInfo struct which is populated with all the data
from the Linguist YAML source file. Functions are provided to access the
LanguageInfo by name or ID.

The other top-level functions like GetLanguageExtensions, GetLanguageGroup, etc.
could in principle be implemented using this structure, which would simplify the
code generation. But that would be a big change so I didn't do any of that.
Perhaps in the next major version something like that would make sense.
2021-10-11 13:32:29 -07:00