add a Page#markup_class reader

This commit is contained in:
risk
2011-08-08 15:26:22 -07:00
parent cd4704aed7
commit 6f15fafc4a
+8 -1
View File
@@ -168,7 +168,7 @@ module Gollum
#
# Returns the String data.
def formatted_data(&block)
@blob && @wiki.markup_classes[format].new(self).render(historical?, &block)
@blob && markup_class.render(historical?, &block)
end
# Public: The format of the page.
@@ -180,6 +180,13 @@ module Gollum
self.class.format_for(@blob.name)
end
# Gets the Gollum::Markup instance that will render this page's content.
#
# Returns a Gollum::Markup instance.
def markup_class
@markup_class ||= @wiki.markup_classes[format].new(self)
end
# Public: The current version of the page.
#
# Returns the Grit::Commit.