Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
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
Show 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 @@ module Gitlab
#
# Returns boolean
def
gitlab_markdown?
(
filename
)
filename
.
downcase
.
end_with?
(
*
%w(.mdown .md .markdown)
)
filename
.
downcase
.
end_with?
(
*
%w(.mdown .m
kd .mkdn .m
d .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 @@ describe Gitlab::MarkupHelper do
end
describe
'#gitlab_markdown?'
do
%w(mdown md markdown)
.
each
do
|
type
|
%w(mdown m
kd mkdn m
d 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