Commit 849528be authored by Etienne Baqué's avatar Etienne Baqué

Merge branch 'bw-banzai-task' into 'master'

Add rake task for easier Banzai render testing

See merge request gitlab-org/gitlab!79248
parents a709efe7 3a4bf6b7
# 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 = []
puts "\nEnter markdown below, Ctrl-D to end (if you need blank lines, paste in the full text):"
while buf = Readline.readline('', true)
markdown << buf
end
puts "Rendering using Gitlab's FullPipeline...\n\n"
html = MarkupHelper.markdown(markdown.join("\n"), { pipeline: :full, project: nil })
puts html.gsub('&#x000A;', "\n")
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