BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
4bd92e68
Commit
4bd92e68
authored
Sep 03, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return early from markdown and gfm when text is empty
parent
e5d89c10
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
2 deletions
+4
-2
gitlab_markdown_helper.rb
app/helpers/gitlab_markdown_helper.rb
+4
-0
_event_issue.atom.haml
app/views/events/_event_issue.atom.haml
+0
-1
_event_merge_request.atom.haml
app/views/events/_event_merge_request.atom.haml
+0
-1
No files found.
app/helpers/gitlab_markdown_helper.rb
View file @
4bd92e68
...
...
@@ -45,6 +45,8 @@ module GitlabMarkdownHelper
end
def
markdown
(
text
,
context
=
{})
return
unless
text
.
present?
context
.
merge!
(
path:
@path
,
project:
@project
,
...
...
@@ -59,6 +61,8 @@ module GitlabMarkdownHelper
# TODO (rspeicher): Remove all usages of this helper and just call `markdown`
# with a custom pipeline depending on the content being rendered
def
gfm
(
text
,
options
=
{})
return
unless
text
.
present?
options
.
merge!
(
path:
@path
,
project:
@project
,
...
...
app/views/events/_event_issue.atom.haml
View file @
4bd92e68
%div
{
xmlns:
"http://www.w3.org/1999/xhtml"
}
-
if
issue
.
description
.
present?
=
markdown
(
issue
.
description
,
xhtml:
true
,
reference_only_path:
false
,
project:
issue
.
project
)
app/views/events/_event_merge_request.atom.haml
View file @
4bd92e68
%div
{
xmlns:
"http://www.w3.org/1999/xhtml"
}
-
if
merge_request
.
description
.
present?
=
markdown
(
merge_request
.
description
,
xhtml:
true
,
reference_only_path:
false
,
project:
merge_request
.
project
)
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