Support alert block rendering for org-mode and textile

What does this MR do and why?

Closes #600461 (closed).

  1. Introduces Banzai::Filter::MarkupAlertFilter to extract alert markers from blockquote <p> children and wrap them in semantic <div class="markdown-alert-*"> elements.
  2. Registers the filter in MarkupPipeline.
  3. Scopes the conversion to .org and .textile files via a markup_alerts context flag in Gitlab::OtherMarkup.

Screenshots

Visually confirmed rendering on GDK-in-a-box with non-Markdown markup files.

image

Sources

org:

#+begin_quote
[!tip]
GitLab now supports alert blocks for org-mode and textile.
#+end_quote

textile:

bq. [!tip]
GitLab now supports alert blocks for org-mode and textile.

Notes

  • No docs updates included – this area isn't well covered by existing documentation. If there are specific docs that should be updated, please flag them.
  • Backend engineer, but fairly new to Rails – feedback on Rails conventions welcome.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by skkzsh

Merge request reports

Loading