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
Tatuya Kamada
gitlab-ce
Commits
c307fd22
Commit
c307fd22
authored
Jan 08, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'xss/readme' of /home/git/repositories/gitlab/gitlabhq
parents
449a8eb9
d6c037de
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
4 deletions
+8
-4
app/helpers/application_helper.rb
app/helpers/application_helper.rb
+4
-0
app/views/projects/blob/_text.html.haml
app/views/projects/blob/_text.html.haml
+1
-1
app/views/projects/tree/_readme.html.haml
app/views/projects/tree/_readme.html.haml
+2
-2
app/views/snippets/_blob.html.haml
app/views/snippets/_blob.html.haml
+1
-1
No files found.
app/helpers/application_helper.rb
View file @
c307fd22
...
@@ -217,4 +217,8 @@ module ApplicationHelper
...
@@ -217,4 +217,8 @@ module ApplicationHelper
haml_tag
:script
,
"$('."
+
html_class
+
"').timeago().tooltip()"
haml_tag
:script
,
"$('."
+
html_class
+
"').timeago().tooltip()"
end
.
html_safe
end
.
html_safe
end
end
def
render_markup
(
file_name
,
file_content
)
GitHub
::
Markup
.
render
(
file_name
,
file_content
).
html_safe
end
end
end
app/views/projects/blob/_text.html.haml
View file @
c307fd22
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
=
markdown
(
blob
.
data
)
=
markdown
(
blob
.
data
)
-
elsif
markup?
(
blob
.
name
)
-
elsif
markup?
(
blob
.
name
)
.file-content.wiki
.file-content.wiki
=
r
aw
GitHub
::
Markup
.
render
(
blob
.
name
,
blob
.
data
)
=
r
ender_markup
(
blob
.
name
,
blob
.
data
)
-
else
-
else
.file-content.code
.file-content.code
-
unless
blob
.
empty?
-
unless
blob
.
empty?
...
...
app/views/projects/tree/_readme.html.haml
View file @
c307fd22
...
@@ -9,5 +9,5 @@
...
@@ -9,5 +9,5 @@
-
elsif
plain_text_readme?
(
readme
.
name
)
-
elsif
plain_text_readme?
(
readme
.
name
)
%pre
.clean
%pre
.clean
=
readme
.
data
=
readme
.
data
-
els
e
-
els
if
markup?
(
readme
.
name
)
=
r
aw
GitHub
::
Markup
.
render
(
readme
.
name
,
readme
.
data
)
=
r
ender_markup
(
readme
.
name
,
readme
.
data
)
app/views/snippets/_blob.html.haml
View file @
c307fd22
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
=
markdown
(
@snippet
.
data
)
=
markdown
(
@snippet
.
data
)
-
elsif
markup?
(
@snippet
.
file_name
)
-
elsif
markup?
(
@snippet
.
file_name
)
.file-content.wiki
.file-content.wiki
=
r
aw
GitHub
::
Markup
.
render
(
@snippet
.
file_name
,
@snippet
.
data
)
=
r
ender_markup
(
@snippet
.
file_name
,
@snippet
.
data
)
-
else
-
else
.file-content.code
.file-content.code
%div
{
class:
user_color_scheme_class
}
%div
{
class:
user_color_scheme_class
}
...
...
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