Commit c3317047 authored by Brett Walker's avatar Brett Walker

Add rake task for Banzai rendering

parent a9216d7d
# frozen_string_literal: true
namespace :gitlab do
namespace :banzai do
desc 'GitLab | Banzai | Render markdown using our FullPipeline (input will be requested)'
task :render => :environment do |_t|
markdown = Array.new
puts "\nEnter markdown below, Ctrl-D to end (if you need blank lines, paste in the full text):"
while buf = Readline.readline('', true) do
markdown << buf
end
puts "Rendering using Gitlab's FullPipeline...\n\n"
puts Banzai::Pipeline::FullPipeline.to_html(markdown.join("\n"), project: nil)
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment