summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2018-11-16 12:09:18 +0100
committerJames Lopez <james@jameslopez.es>2018-11-16 12:09:18 +0100
commita4ae5411f5e75ca90f6172d8d03c6524f8efb8cb (patch)
tree890ae3e7dbc0f0c3f05a71d19e713e676f274a62
parent53b2c3011e01b7f0174a0863e2597d3b4a251321 (diff)
downloadgitlab-ce-54011-all-files-named-index-have-their-content-rendered-as-if-they-were-text-files.tar.gz
-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 48025f6ad5a..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(#{Regexp.union(*Gitlab::MarkupHelper::PLAIN_FILENAMES).source})(\.(#{Regexp.union(*Gitlab::MarkupHelper::EXTENSIONS).source}))?\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,