summaryrefslogtreecommitdiff
path: root/lib/banzai/renderer.rb
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2016-02-21 19:21:28 -0500
committerRobert Speicher <rspeicher@gmail.com>2016-03-02 22:19:36 -0500
commit74751791a8bf27c5576832f73a57a5b110b423ad (patch)
tree77f820cdfec80249d95f84356750c8e94995d428 /lib/banzai/renderer.rb
parent1fa7671f44291f78131c0fa31f6d1ffcb3ff6bbc (diff)
downloadgitlab-ce-74751791a8bf27c5576832f73a57a5b110b423ad.tar.gz
Add a PreProcessPipeline
Diffstat (limited to 'lib/banzai/renderer.rb')
-rw-r--r--lib/banzai/renderer.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/banzai/renderer.rb b/lib/banzai/renderer.rb
index 891c0fd7749..ae714c87dc5 100644
--- a/lib/banzai/renderer.rb
+++ b/lib/banzai/renderer.rb
@@ -31,6 +31,12 @@ module Banzai
Pipeline[context[:pipeline]].call(text, context)
end
+ def self.pre_process(text, context)
+ pipeline = Pipeline[:pre_process]
+
+ pipeline.to_html(text, context)
+ end
+
# Perform post-processing on an HTML String
#
# This method is used to perform state-dependent changes to a String of