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
3bdf9308
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
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
app/views/snippets/_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?
-
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