mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-12-08 20:38:47 +00:00
Use filenames as a definitive answer (#2006)
* Separate find_by_extension and find_by_filename find_by_extension now takes a path as argument and not only the file extension. Currently only find_by_extension is used as a strategy. * Add find_by_filename as first strategy
This commit is contained in:
committed by
Brandon Black
parent
9d8392dab8
commit
9b941a34f0
@@ -59,8 +59,9 @@ class << Linguist
|
||||
# Strategies are called in turn until a single Language is returned.
|
||||
STRATEGIES = [
|
||||
Linguist::Strategy::Modeline,
|
||||
Linguist::Shebang,
|
||||
Linguist::Strategy::Filename,
|
||||
Linguist::Shebang,
|
||||
Linguist::Strategy::Extension,
|
||||
Linguist::Heuristics,
|
||||
Linguist::Classifier
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user