mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-12 06:06:05 +10:00
Merge branch 'more-markdown-extensions' into 'master'
markup_helper: detect .mkd and .mkdn as markdown See merge request !1148
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user