Add rake task for easier Banzai render testing
What does this MR do and why?
Adds rake gitlab:banzai:render
to allow running a markdown string through our full Banzai pipeline.
Created because I can never remember the proper Banzai::Pipeline::FullPipeline.to_html(markdown, project: nil)
command
Screenshots or screen recordings
> spring rake gitlab:banzai:render
Running via Spring preloader in process 33690
Enter markdown below, Ctrl-D to end (if you need blank lines, paste in the full text):
- [ ] one
- [ ] two
```ruby
some code
```
lorem ipsum dolor...
Rendering using Gitlab's FullPipeline...
<ul data-sourcepos="1:1-3:0" class="task-list" dir="auto">
<li data-sourcepos="1:1-1:9" class="task-list-item">
<input type="checkbox" class="task-list-item-checkbox" disabled> one</li>
<li data-sourcepos="2:1-3:0" class="task-list-item">
<input type="checkbox" class="task-list-item-checkbox" disabled> two</li>
</ul>
<div class="gl-relative markdown-code-block js-markdown-code">
<pre data-sourcepos="4:1-6:3" class="code highlight js-syntax-highlight language-ruby" lang="ruby" v-pre="true"><code><span id="LC1" class="line" lang="ruby"><span class="n">some</span> <span class="n">code</span></span></code></pre>
<copy-code></copy-code>
</div>
<p data-sourcepos="8:1-8:20" dir="auto">lorem ipsum dolor...</p>
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.