diff options
author | Brett Walker <bwalker@gitlab.com> | 2018-09-19 14:58:43 -0500 |
---|---|---|
committer | Brett Walker <bwalker@gitlab.com> | 2018-09-29 11:29:32 -0500 |
commit | 829c9c65f9b730b3ecad7d3ba222e3dcd6489b85 (patch) | |
tree | 2a9ce8bd65b2bc8291b7c5e63f746c39034ae288 /lib/banzai.rb | |
parent | e5d3a75aac4f0bb287699b21f3a56b8bfe499665 (diff) | |
download | gitlab-ce-829c9c65f9b730b3ecad7d3ba222e3dcd6489b85.tar.gz |
post_process markdown redered by API
Diffstat (limited to 'lib/banzai.rb')
-rw-r--r-- | lib/banzai.rb | 7 |
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 |