add mediawiki support

This commit is contained in:
rick
2011-01-03 15:52:13 -08:00
parent 87da1eaa6d
commit f7b7d0d965
+5 -1
View File
@@ -4,7 +4,7 @@ module Gollum
Wiki.page_class = self
VALID_PAGE_RE = /^(.+)\.(md|mkdn?|mdown|markdown|textile|rdoc|org|creole|re?st(\.txt)?|asciidoc|pod)$/i
VALID_PAGE_RE = /^(.+)\.(md|mkdn?|mdown|markdown|textile|rdoc|org|creole|re?st(\.txt)?|asciidoc|pod|(media)?wiki)$/i
FORMAT_NAMES = { :markdown => "Markdown",
:textile => "Textile",
:rdoc => "RDoc",
@@ -12,6 +12,7 @@ module Gollum
:creole => "Creole",
:rest => "reStructuredText",
:asciidoc => "AsciiDoc",
:mediawiki => "MediaWiki",
:pod => "Pod" }
# Sets a Boolean determing whether this page is a historical version.
@@ -161,6 +162,8 @@ module Gollum
:pod
when /\.(\d)$/i
:roff
when /\.(media)?wiki$/i
:mediawiki
else
nil
end
@@ -252,6 +255,7 @@ module Gollum
when :rest then 'rest'
when :asciidoc then 'asciidoc'
when :pod then 'pod'
when :mediawiki then 'mediawiki'
end
end