summaryrefslogtreecommitdiff
path: root/lib/banzai.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/banzai.rb')
-rw-r--r--lib/banzai.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/banzai.rb b/lib/banzai.rb
index 5df98f66f3b..788f29a6c08 100644
--- a/lib/banzai.rb
+++ b/lib/banzai.rb
@@ -1,4 +1,11 @@
module Banzai
+ # if you need to render markdown, then you probably need to post_process as well,
+ # such as removing references that the current user doesn't have
+ # permission to make
+ def self.render_and_post_process(text, context = {})
+ post_process(render(text, context), context)
+ end
+
def self.render(text, context = {})
Renderer.render(text, context)
end