diff --git a/lib/gollum/markup.rb b/lib/gollum/markup.rb index d5014d8a..0ed17079 100644 --- a/lib/gollum/markup.rb +++ b/lib/gollum/markup.rb @@ -1,14 +1,30 @@ module Gollum class Markup - # Render the content with Gollum wiki syntax on top of the file's own - # markup language. + # Initialize a new Markup object. # # name - The String filename of the page. # data - The String contents of the page. # + # Returns a new Gollum::Markup object, ready for rendering. + def initialize(name, data) + @name = name + @data = data + @tagmap = {} + end + + # Render the content with Gollum wiki syntax on top of the file's own + # markup language. + # # Returns the formatted String content. - def self.render(name, data) - GitHub::Markup.render(name, data) rescue nil + def render + base_markup = GitHub::Markup.render(@name, @data) rescue nil + end + + # Extract all tags into the tagmap and replace with placeholders. + # + # Returns nothing. + def extract_tags + end end end \ No newline at end of file diff --git a/lib/gollum/page.rb b/lib/gollum/page.rb index 45e5eac5..03e5b094 100644 --- a/lib/gollum/page.rb +++ b/lib/gollum/page.rb @@ -35,7 +35,7 @@ module Gollum # # Returns the String data. def formatted_data - Gollum::Markup.render(@blob.name, @blob.data) rescue nil + Gollum::Markup.new(@blob.name, @blob.data).render rescue nil end # Public: The format of the page.