소스 검색

Case insensitive README.* files are immediate

Files with the prefix `README` are now classified as immediate, meaning
they will be highlighted amongst other things, in a case insensitive
way.
Josh Leeb-du Toit 8 년 전
부모
커밋
d9c9dbe89e
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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 directories full of source code.
     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",
             "build.gradle", "Rakefile", "Gruntfile.js",
             "Gruntfile.coffee",