From 6f15fafc4aac0b8efe2d8e2f3c9069ef4bbbacc7 Mon Sep 17 00:00:00 2001 From: risk Date: Mon, 8 Aug 2011 15:26:22 -0700 Subject: [PATCH] add a Page#markup_class reader --- lib/gollum/page.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/gollum/page.rb b/lib/gollum/page.rb index af2ce70a..165c2449 100644 --- a/lib/gollum/page.rb +++ b/lib/gollum/page.rb @@ -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.