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
Léo-Paul Géneau
gitlab-ce
Commits
1c08cb40
Commit
1c08cb40
authored
Sep 11, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1424 from elvanja/issue-1343-empty-string-fix
FIX: Empty string in commit message
parents
a2f7f48c
7e2846fb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
app/decorators/commit_decorator.rb
app/decorators/commit_decorator.rb
+1
-1
app/helpers/gitlab_markdown_helper.rb
app/helpers/gitlab_markdown_helper.rb
+2
-0
No files found.
app/decorators/commit_decorator.rb
View file @
1c08cb40
...
...
@@ -16,7 +16,7 @@ class CommitDecorator < ApplicationDecorator
# In case this first line is longer than 80 characters, it is cut off
# after 70 characters and ellipses (`&hellp;`) are appended.
def
title
return
no_commit_message
unless
safe_message
return
no_commit_message
if
safe_message
.
blank?
title_end
=
safe_message
.
index
(
/\n/
)
if
(
!
title_end
&&
safe_message
.
length
>
80
)
||
(
title_end
&&
title_end
>
80
)
...
...
app/helpers/gitlab_markdown_helper.rb
View file @
1c08cb40
...
...
@@ -11,6 +11,8 @@ module GitlabMarkdownHelper
# explicitly produce the correct linking behavior (i.e.
# "<a>outer text </a><a>gfm ref</a><a> more outer text</a>").
def
link_to_gfm
(
body
,
url
,
html_options
=
{})
return
""
if
body
.
blank?
gfm_body
=
gfm
(
body
,
html_options
)
gfm_body
.
gsub!
(
%r{<a.*?>.*?</a>}m
)
do
|
match
|
...
...
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