Modified gitcode to allow syntax highlighting of arbitrary files

This commit is contained in:
Daniel Kimsey
2012-11-15 16:06:44 -05:00
parent f5581c4b49
commit 7d5311a075
4 changed files with 77 additions and 24 deletions
+2 -2
View File
@@ -1,8 +1,8 @@
class WikiFactory
def self.create p
def self.create p, opt={}
path = testpath "examples/test.git"
Grit::Repo.init_bare(path)
Gollum::Wiki.default_options = {:universal_toc => false}
Gollum::Wiki.default_options = {:universal_toc => false}.merge(opt)
cleanup = Proc.new { FileUtils.rm_r File.join(File.dirname(__FILE__), *%w[examples test.git]) }
wiki = Gollum::Wiki.new(path)
# set 'wiki-' prefix on ids for tests