mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-06-27 22:57:50 -03:00
test: cover GetLanguageByContent confusing edge cases
And clarify documentation wording, based on discussion at https://github.com/go-enry/go-enry/issues/145 test plan: * go test -run '^Test_EnryTestSuite$' -testify.m '^(TestGetLanguageByContent)$' ./...
This commit is contained in:
@ -61,7 +61,7 @@ To make a guess only based on the content of the file or a text snippet, use
|
||||
|
||||
### By file
|
||||
|
||||
The most accurate guess would be one when both, the file name and the content are available:
|
||||
The most accurate guess would be when both, a file name and it's content are available:
|
||||
|
||||
- `GetLanguagesByContent` only uses file extension and a set of regexp-based content heuristics.
|
||||
- `GetLanguages` uses the full set of matching strategies and is expected to be most accurate.
|
||||
|
Reference in New Issue
Block a user