Parcourir la source

Merge pull request #356 from joshleeb/highlight-lowercase-readme

Case Insensitive README.* Files As immediate
Benjamin Sago il y a 8 ans
Parent
commit
3614f5513d
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/info/filetype.rs

+ 1 - 1
src/info/filetype.rs

@@ -19,7 +19,7 @@ impl FileExtensions {
     /// in order to kick off the build of a project. It’s usually only present
     /// in order to kick off the build of a project. It’s usually only present
     /// in directories full of source code.
     /// in directories full of source code.
     fn is_immediate(&self, file: &File) -> bool {
     fn is_immediate(&self, file: &File) -> bool {
-        file.name.starts_with("README") || file.name_is_one_of( &[
+        file.name.to_lowercase().starts_with("readme") || file.name_is_one_of( &[
             "Makefile", "Cargo.toml", "SConstruct", "CMakeLists.txt",
             "Makefile", "Cargo.toml", "SConstruct", "CMakeLists.txt",
             "build.gradle", "Rakefile", "Gruntfile.js",
             "build.gradle", "Rakefile", "Gruntfile.js",
             "Gruntfile.coffee", "BUILD", "WORKSPACE", "build.xml"
             "Gruntfile.coffee", "BUILD", "WORKSPACE", "build.xml"