hyperpolyglot
hyperpolyglot copied to clipboard
A fast programming language detector
Using this awesome tool (thank you!) I noticed that Vue has the wrong color.  Github is using this color:  Hex: #41b883 I would make a PR if it...
For example grab a C file, change its extension to `.go`. All `github-linguist`, `enry` and `hyperpolyglot` detect it as a Go source. If I remove the extension, `hyperpolyglot` returns empty.
Allows users to combine multiple identifiers themselves. Throw out the scheduling method for a single recognizer externally.
tested against: ``` use std::collections::HashMap; use std::fmt::{self, Debug, Formatter}; use std::path::{Path, PathBuf}; use crate::core::{Dependency, Package, PackageId, Source, SourceId, Summary}; use crate::sources::PathSource; use crate::util::errors::CargoResult; use crate::util::Config; use anyhow::Context as _; use...
``` echo 'console.log("test")' > some-file hyply some-file ``` returns nothing, I expected JavaScript or TypeScript
Instead of creating a file and then running it through the detection, you can now just use detect_from_text.
```rs pub enum Detection { Filename(&'static str), Extension(&'static str), Shebang(&'static str), Heuristics(&'static str), Classifier(&'static str), } ``` From the docs it's not clear which values this string can have! It...