Merge branch 'more-markdown-extensions' into 'master'

markup_helper: detect .mkd and .mkdn as markdown

See merge request !1148
This commit is contained in:
Stan Hu
2015-08-12 23:18:05 +00:00
3 changed files with 3 additions and 2 deletions
+1
View File
@@ -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.
+1 -1
View File
@@ -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.
+1 -1
View File
@@ -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