poslop
|
efa8c7145c
|
Language detection: switch to go-enry with hint-seeded classifier (#41)
CI / docker (push) Skipped
CI / test (push) Successful in 35s
- Add github.com/go-enry/go-enry/v2 dependency to go.mod
- guessLang: JSON fast path, then enry strategies (shebangs, XML, modelines,
content heuristics), then enry's Linguist-trained Bayesian classifier over
regex-hint candidate languages; curated dropdown expanded with typescript,
html, css, xml, php, ruby, perl, lua, dockerfile, toml, ini, diff, csharp
- enry display names normalized to lowercase stored ids (Dockerfile->dockerfile,
Shell->bash, C#->csharp); unsupported languages render unhighlighted
- Tests: existing languages, all new languages, magic markers (enry shebang/
DOCTYPE/FROM/diff handling), canonical mapping
|
2026-09-08 21:25:36 -05:00 |
|