Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2016-02-22 03:21:28 +0300
committerRobert Speicher <rspeicher@gmail.com>2016-03-03 06:19:36 +0300
commit74751791a8bf27c5576832f73a57a5b110b423ad (patch)
tree77f820cdfec80249d95f84356750c8e94995d428 /lib/banzai/renderer.rb
parent1fa7671f44291f78131c0fa31f6d1ffcb3ff6bbc (diff)
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