Sha256: 93aad9cf91d7584424fcae59cfff2c56dc7d0e5a9a1607150424bbc7b74b41ae
Contents?: true
Size: 912 Bytes
Versions: 1
Compression:
Stored size: 912 Bytes
Contents
# ~*~ encoding: utf-8 ~*~ # stdlib require 'digest/md5' require 'digest/sha1' require 'ostruct' # external require 'i18n' require 'github/markup' require 'rhino' if RUBY_PLATFORM == 'java' # internal require ::File.expand_path('../gollum/uri_encode_component', __FILE__) module Gollum VERSION = '5.3.1' ::I18n.available_locales = [:en] ::I18n.load_path = Dir[::File.expand_path("lib/gollum/locales") + "/*.yml"] def self.assets_path ::File.expand_path('gollum/public', ::File.dirname(__FILE__)) end class TemplateFilter @@filters = {} def self.add_filter(pattern, &replacement) @@filters[pattern] = replacement end def self.apply_filters(wiki_page, data) @@filters.each do |pattern, replacement| params = replacement.parameters.length == 0 ? nil : wiki_page data.gsub!(pattern, replacement.call(*params)) end data end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gollum-5.3.1 | lib/gollum.rb |