lib/gollum-lib/markup.rb in gollum-lib-3.0.0 vs lib/gollum-lib/markup.rb in gollum-lib-4.0.0
- old
+ new
@@ -51,10 +51,13 @@
attr_accessor :metadata
attr_reader :encoding
attr_reader :sanitize
attr_reader :format
attr_reader :wiki
+ attr_reader :page
+ attr_reader :parent_page
+ attr_reader :sub_page
attr_reader :name
attr_reader :include_levels
attr_reader :to_xml_opts
attr_reader :dir
@@ -70,10 +73,11 @@
@data = page.text_data
@version = page.version.id if page.version
@format = page.format
@sub_page = page.sub_page
@parent_page = page.parent_page
+ @page = page
@dir = ::File.dirname(page.path)
end
@metadata = nil
@to_xml_opts = { :save_with => Nokogiri::XML::Node::SaveOptions::DEFAULT_XHTML ^ 1, :indent => 0, :encoding => 'UTF-8' }
end
@@ -103,10 +107,10 @@
#
# data - the data to send through the chain
# filter_chain - the chain to process
#
# Returns the formatted data
- def process_chain data, filter_chain
+ def process_chain(data, filter_chain)
# First we extract the data through the chain...
filter_chain.each do |filter|
data = filter.extract(data)
end