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
3bdf9308
Unverified
Commit
3bdf9308
authored
Nov 20, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Render markdown in snippets
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
436e9646
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
_blob.html.haml
app/views/snippets/_blob.html.haml
+13
-4
No files found.
app/views/snippets/_blob.html.haml
View file @
3bdf9308
...
...
@@ -8,9 +8,18 @@
=
link_to
"Edit"
,
edit_snippet_path
(
@snippet
),
class:
"btn btn-tiny"
,
title:
'Edit Snippet'
=
link_to
"Delete"
,
snippet_path
(
@snippet
),
method: :delete
,
confirm:
"Are you sure?"
,
class:
"btn btn-tiny"
,
title:
'Delete Snippet'
=
link_to
"Raw"
,
raw_snippet_path
(
@snippet
),
class:
"btn btn-tiny"
,
target:
"_blank"
.file-content.code
-
unless
@snippet
.
content
.
empty?
%div
{
class:
user_color_scheme_class
}
=
raw
@snippet
.
colorize
(
formatter: :gitlab
)
-
unless
@snippet
.
content
.
empty?
-
if
gitlab_markdown?
(
@snippet
.
file_name
)
.file-content.wiki
=
preserve
do
=
markdown
(
@snippet
.
data
)
-
elsif
markup?
(
@snippet
.
file_name
)
.file-content.wiki
=
raw
GitHub
::
Markup
.
render
(
@snippet
.
file_name
,
@snippet
.
data
)
-
else
.file-content.code
%div
{
class:
user_color_scheme_class
}
=
raw
@snippet
.
colorize
(
formatter: :gitlab
)
-
else
.file-content.code
%p
.nothing_here_message
Empty file
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