summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2018-11-14 15:37:30 +0100
committerJames Lopez <james@jameslopez.es>2018-11-14 16:07:31 +0100
commit3cd538c2e9e18f31cee008d9b9e13df4dfd40b1d (patch)
treefd0c6b32a4ccfc2951ec929a3c5765fd06326d83 /lib
parent24e5599748d98f34dc4f534eebc79a1bd9f0ddf9 (diff)
downloadgitlab-ce-3cd538c2e9e18f31cee008d9b9e13df4dfd40b1d.tar.gz
Fix text rendering of readme/index
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..4e749068f93 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: %r{\A(readme|index)(|\.#{Gitlab::MarkupHelper::EXTENSIONS.join('|\.')})$[^\/]*\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,