add a Page#markup_class reader
This commit is contained in:
+8
-1
@@ -168,7 +168,7 @@ module Gollum
|
|||||||
#
|
#
|
||||||
# Returns the String data.
|
# Returns the String data.
|
||||||
def formatted_data(&block)
|
def formatted_data(&block)
|
||||||
@blob && @wiki.markup_classes[format].new(self).render(historical?, &block)
|
@blob && markup_class.render(historical?, &block)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Public: The format of the page.
|
# Public: The format of the page.
|
||||||
@@ -180,6 +180,13 @@ module Gollum
|
|||||||
self.class.format_for(@blob.name)
|
self.class.format_for(@blob.name)
|
||||||
end
|
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.
|
# Public: The current version of the page.
|
||||||
#
|
#
|
||||||
# Returns the Grit::Commit.
|
# Returns the Grit::Commit.
|
||||||
|
|||||||
Reference in New Issue
Block a user