Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSteve Azzopardi <sazzopardi@gitlab.com>2018-11-16 14:52:59 +0300
committerSteve Azzopardi <sazzopardi@gitlab.com>2018-11-16 14:52:59 +0300
commit6ac06e95e1da99fd7d851a04fc96edf6b273d541 (patch)
tree0d854348c9eda274b877b18fa7354e6b2d1a34b7 /lib
parent348dd42d797bafe2ffb64a2ed224c106726ea938 (diff)
parenta4ae5411f5e75ca90f6172d8d03c6524f8efb8cb (diff)
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.rb2
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,