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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
7e2846fb
Commit
7e2846fb
authored
Sep 10, 2012
by
Vanja Radovanović
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
using blank?, much shorter
parent
8d171a8c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
app/decorators/commit_decorator.rb
app/decorators/commit_decorator.rb
+1
-1
app/helpers/gitlab_markdown_helper.rb
app/helpers/gitlab_markdown_helper.rb
+1
-1
No files found.
app/decorators/commit_decorator.rb
View file @
7e2846fb
...
...
@@ -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
&&
!
safe_message
.
strip
.
empty
?
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 @
7e2846fb
...
...
@@ -11,7 +11,7 @@ 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
""
unless
body
&&
!
body
.
strip
.
empty
?
return
""
if
body
.
blank
?
gfm_body
=
gfm
(
body
,
html_options
)
...
...
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