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
Jérome Perrin
gitlab-ce
Commits
0e3f8ea2
Commit
0e3f8ea2
authored
Aug 10, 2014
by
Robert Schilling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use simple_format if we don't have a proper renderer
parent
2fd30cc5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
7 deletions
+2
-7
app/helpers/tree_helper.rb
app/helpers/tree_helper.rb
+0
-4
app/views/projects/tree/_readme.html.haml
app/views/projects/tree/_readme.html.haml
+2
-3
No files found.
app/helpers/tree_helper.rb
View file @
0e3f8ea2
...
@@ -52,10 +52,6 @@ module TreeHelper
...
@@ -52,10 +52,6 @@ module TreeHelper
filename
.
downcase
.
end_with?
(
*
%w(.mdown .md .markdown)
)
filename
.
downcase
.
end_with?
(
*
%w(.mdown .md .markdown)
)
end
end
def
plain_text_readme?
filename
filename
=~
/^README(.txt)?$/i
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/projects/tree/_readme.html.haml
View file @
0e3f8ea2
...
@@ -6,8 +6,7 @@
...
@@ -6,8 +6,7 @@
-
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
-
elsif
markup?
(
readme
.
name
)
-
elsif
markup?
(
readme
.
name
)
=
render_markup
(
readme
.
name
,
readme
.
data
)
=
render_markup
(
readme
.
name
,
readme
.
data
)
-
else
=
simple_format
(
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