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 /lib/gitlab/markup_helper.rb
parentdaa0925016a63dcde448643cbf1310aca359cf37 (diff)
Simplify and unify helpers for rendering markup
Diffstat (limited to 'lib/gitlab/markup_helper.rb')
-rw-r--r--lib/gitlab/markup_helper.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/gitlab/markup_helper.rb b/lib/gitlab/markup_helper.rb
index fb037266d23..f99be969d3e 100644
--- a/lib/gitlab/markup_helper.rb
+++ b/lib/gitlab/markup_helper.rb
@@ -8,8 +8,10 @@ module Gitlab
#
# Returns boolean
def markup?(filename)
- filename.downcase.end_with?(*%w(.textile .rdoc .org .creole .wiki
- .mediawiki .rst .adoc .ad .asciidoc))
+ gitlab_markdown?(filename) ||
+ asciidoc?(filename) ||
+ filename.downcase.end_with?(*%w(.textile .rdoc .org .creole .wiki
+ .mediawiki .rst))
end
# Public: Determines if a given filename is compatible with
@@ -32,7 +34,7 @@ module Gitlab
end
def previewable?(filename)
- gitlab_markdown?(filename) || markup?(filename)
+ markup?(filename)
end
end
end