diff options
author | Steve Azzopardi <sazzopardi@gitlab.com> | 2018-11-16 11:52:59 +0000 |
---|---|---|
committer | Steve Azzopardi <steveazz@outlook.com> | 2018-11-16 12:55:20 +0100 |
commit | 541e638ddbc1c04d14d8ed67035d581852e20522 (patch) | |
tree | d2fa6c2ad065d6123c88dbf63ae7cfc36e133c57 /lib | |
parent | 603800f26f4b0b39fe3de82ede75868f47eacc2d (diff) | |
download | gitlab-ce-541e638ddbc1c04d14d8ed67035d581852e20522.tar.gz |
Merge branch '54011-all-files-named-index-have-their-content-rendered-as-if-they-were-text-files' into 'master'
Resolve "All files named `index.*` have their content rendered as if they were text files"
Closes #54011
See merge request gitlab-org/gitlab-ce!23063
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/file_detector.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/file_detector.rb b/lib/gitlab/file_detector.rb index d6338b09e3d..2770469ca9f 100644 --- a/lib/gitlab/file_detector.rb +++ b/lib/gitlab/file_detector.rb @@ -8,7 +8,7 @@ module Gitlab module FileDetector PATTERNS = { # Project files - readme: %r{\A(readme|index)[^/]*\z}i, + readme: /\A(#{Regexp.union(*Gitlab::MarkupHelper::PLAIN_FILENAMES).source})(\.(#{Regexp.union(*Gitlab::MarkupHelper::EXTENSIONS).source}))?\z/i, changelog: %r{\A(changelog|history|changes|news)[^/]*\z}i, license: %r{\A((un)?licen[sc]e|copying)(\.[^/]+)?\z}i, contributing: %r{\Acontributing[^/]*\z}i, |