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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
453b2ae6
Commit
453b2ae6
authored
Oct 16, 2012
by
randx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix plain text readme
parent
e8d6c3c1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
1 deletion
+16
-1
app/assets/stylesheets/common.scss
app/assets/stylesheets/common.scss
+8
-0
app/helpers/tree_helper.rb
app/helpers/tree_helper.rb
+4
-0
app/views/tree/_readme.html.haml
app/views/tree/_readme.html.haml
+4
-1
No files found.
app/assets/stylesheets/common.scss
View file @
453b2ae6
...
@@ -662,3 +662,11 @@ li.note {
...
@@ -662,3 +662,11 @@ li.note {
}
}
}
}
pre
{
&
.clean
{
background
:none
;
border
:none
;
margin
:
0
;
padding
:
0
;
}
}
app/helpers/tree_helper.rb
View file @
453b2ae6
...
@@ -51,6 +51,10 @@ module TreeHelper
...
@@ -51,6 +51,10 @@ module TreeHelper
filename
.
end_with?
(
*
%w(.mdown .md .markdown)
)
filename
.
end_with?
(
*
%w(.mdown .md .markdown)
)
end
end
def
plain_text_readme?
filename
filename
==
'README'
end
# Simple shortcut to File.join
# Simple shortcut to File.join
def
tree_join
(
*
args
)
def
tree_join
(
*
args
)
File
.
join
(
*
args
)
File
.
join
(
*
args
)
...
...
app/views/tree/_readme.html.haml
View file @
453b2ae6
...
@@ -6,5 +6,8 @@
...
@@ -6,5 +6,8 @@
-
if
gitlab_markdown?
(
readme
.
name
)
-
if
gitlab_markdown?
(
readme
.
name
)
=
preserve
do
=
preserve
do
=
markdown
(
readme
.
data
)
=
markdown
(
readme
.
data
)
-
elsif
plain_text_readme?
(
readme
.
name
)
%pre
.clean
=
readme
.
data
-
else
-
else
=
raw
GitHub
::
Markup
.
render
(
readme
.
name
,
readme
.
data
)
=
raw
GitHub
::
Markup
.
render
(
readme
.
name
,
readme
.
data
)
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