Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
d298f5d54109
Commit
899afd00
authored
Nov 26, 2012
by
Dmitriy Zaporozhets
Browse files
Fix snippet render issue cause of haml preserve
parent
3984cc0d900a
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/views/snippets/_blob.html.haml
0 → 100644
View file @
d298f5d5
.file_holder
.file_title
%i
.icon-file
%strong
=
@snippet
.
file_name
%span
.options
=
link_to
"raw"
,
raw_project_snippet_path
(
@project
,
@snippet
),
class:
"btn very_small"
,
target:
"_blank"
.file_content.code
-
unless
@snippet
.
content
.
empty?
%div
{
class:
current_user
.
dark_scheme
?
"black"
:
"white"
}
:preserve
#{
raw
@snippet
.
colorize
(
formatter: :gitlab
)
}
-
else
%p
.nothing_here_message
Empty file
app/views/snippets/show.html.haml
View file @
d298f5d5
...
...
@@ -7,24 +7,5 @@
=
link_to
"Edit"
,
edit_project_snippet_path
(
@project
,
@snippet
),
class:
"btn small right"
%br
%div
.file_holder
.file_title
%i
.icon-file
%strong
=
@snippet
.
file_name
%span
.options
=
link_to
"raw"
,
raw_project_snippet_path
(
@project
,
@snippet
),
class:
"btn very_small"
,
target:
"_blank"
.file_content.code
-
unless
@snippet
.
content
.
empty?
%div
{
class:
current_user
.
dark_scheme
?
"black"
:
"white"
}
=
preserve
do
=
raw
Pygments
.
highlight
(
@snippet
.
content
,
formatter: :gitlab
)
-
else
%h4
.nothing_here_message
Empty file
.clearfix
%div
#notes
=
render
"notes/notes_with_form"
,
tid:
@snippet
.
id
,
tt:
"snippet"
%div
=
render
'blob'
%div
#notes
=
render
"notes/notes_with_form"
,
tid:
@snippet
.
id
,
tt:
"snippet"
app/views/tree/blob/_text.html.haml
View file @
d298f5d5
...
...
@@ -12,4 +12,4 @@
=
preserve
do
=
raw
blob
.
colorize
(
formatter: :gitlab
)
-
else
%
h4
.nothing_here_message
Empty file
%
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