Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
projects.thm.de
GitLab
Commits
013260e0
Commit
013260e0
authored
Aug 12, 2015
by
Ben Boeckel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
markup_helper: detect .mkd and .mkdn as markdown
parent
cd579cb2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
2 deletions
+3
-2
CHANGELOG
CHANGELOG
+1
-0
lib/gitlab/markup_helper.rb
lib/gitlab/markup_helper.rb
+1
-1
spec/lib/gitlab/markup_helper_spec.rb
spec/lib/gitlab/markup_helper_spec.rb
+1
-1
No files found.
CHANGELOG
View file @
013260e0
...
...
@@ -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.
...
...
lib/gitlab/markup_helper.rb
View file @
013260e0
...
...
@@ -21,7 +21,7 @@ def markup?(filename)
#
# 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.
...
...
spec/lib/gitlab/markup_helper_spec.rb
View file @
013260e0
...
...
@@ -15,7 +15,7 @@
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment