Commit 013260e0 authored by Ben Boeckel's avatar Ben Boeckel

markup_helper: detect .mkd and .mkdn as markdown

parent cd579cb2
......@@ -56,6 +56,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.
......
......@@ -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.
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment