diff options
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | lib/gitlab/markup_helper.rb | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/markup_helper_spec.rb | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/CHANGELOG b/CHANGELOG index f09d66ed3f7..428355a052c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -53,6 +53,7 @@ v 7.14.0 (unreleased) - Include branch/tag name in archive file and directory name - Add dropzone upload progress - Add a label for merged branches on branches page (Florent Baldino) + - Detect .mkd and .mkdn files as markdown (Ben Boeckel) v 7.13.3 - Fix bug causing Bitbucket importer to crash when OAuth application had been removed. diff --git a/lib/gitlab/markup_helper.rb b/lib/gitlab/markup_helper.rb index b1991e2e285..a5f767b134d 100644 --- a/lib/gitlab/markup_helper.rb +++ b/lib/gitlab/markup_helper.rb @@ -21,7 +21,7 @@ module Gitlab # # Returns boolean def gitlab_markdown?(filename) - filename.downcase.end_with?(*%w(.mdown .md .markdown)) + filename.downcase.end_with?(*%w(.mdown .mkd .mkdn .md .markdown)) end # Public: Determines if the given filename has AsciiDoc extension. diff --git a/spec/lib/gitlab/markup_helper_spec.rb b/spec/lib/gitlab/markup_helper_spec.rb index 7e716e866b1..e610fab05da 100644 --- a/spec/lib/gitlab/markup_helper_spec.rb +++ b/spec/lib/gitlab/markup_helper_spec.rb @@ -15,7 +15,7 @@ describe Gitlab::MarkupHelper do end describe '#gitlab_markdown?' do - %w(mdown md markdown).each do |type| + %w(mdown mkd mkdn md markdown).each do |type| it "returns true for #{type} files" do expect(Gitlab::MarkupHelper.gitlab_markdown?("README.#{type}")).to be_truthy end |