Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2015-05-13 02:54:13 +0300
committerJakub Jirutka <jakub@jirutka.cz>2015-05-18 23:52:13 +0300
commitb0659c1b072267e0e1fa3066ca1a8cc17bc8f6c0 (patch)
tree54701d5d517061602ff5ac58512268f4c18a105a /app/helpers/tree_helper.rb
parentdaa0925016a63dcde448643cbf1310aca359cf37 (diff)
Simplify and unify helpers for rendering markup
Diffstat (limited to 'app/helpers/tree_helper.rb')
-rw-r--r--app/helpers/tree_helper.rb10
1 files changed, 1 insertions, 9 deletions
diff --git a/app/helpers/tree_helper.rb b/app/helpers/tree_helper.rb
index c03564a71ab..03a49e119b8 100644
--- a/app/helpers/tree_helper.rb
+++ b/app/helpers/tree_helper.rb
@@ -25,15 +25,7 @@ module TreeHelper
end
def render_readme(readme)
- if gitlab_markdown?(readme.name)
- preserve(markdown(readme.data))
- elsif asciidoc?(readme.name)
- asciidoc(readme.data)
- elsif markup?(readme.name)
- render_markup(readme.name, readme.data)
- else
- simple_format(readme.data)
- end
+ render_markup(readme.name, readme.data)
end
# Return an image icon depending on the file type and mode