Check if a file path is supported.
(&self, path: &str)
| 272 | |
| 273 | /// Check if a file path is supported. |
| 274 | pub fn is_supported(&self, path: &str) -> bool { |
| 275 | Language::detect(path) |
| 276 | .map(|lang| self.parsers.contains_key(&lang)) |
| 277 | .unwrap_or(false) |
| 278 | } |
| 279 | |
| 280 | /// Detect the language for a file path. |
| 281 | pub fn detect_language(&self, path: &str) -> Option<Language> { |