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
899afd00
Commit
899afd00
authored
Nov 26, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix snippet render issue cause of haml preserve
parent
29636d4d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
22 deletions
+16
-22
app/views/snippets/_blob.html.haml
app/views/snippets/_blob.html.haml
+13
-0
app/views/snippets/show.html.haml
app/views/snippets/show.html.haml
+2
-21
app/views/tree/blob/_text.html.haml
app/views/tree/blob/_text.html.haml
+1
-1
No files found.
app/views/snippets/_blob.html.haml
0 → 100644
View file @
899afd00
.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 @
899afd00
...
...
@@ -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 @
899afd00
...
...
@@ -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