Add styled alerts to markdown#13079
Open
Hiviexd wants to merge 1 commit into
Open
Conversation
bde7146 to
2b3ea14
Compare
notbakaneko
requested changes
Jun 30, 2026
Collaborator
There was a problem hiding this comment.
You can whitelist extra attributes in attributes_allowed and add attributes to blockquotes:
{data-alert=note}
> **line1**
> line2
custom inline containers are for customizing the rendering of inline elements, not abusing to make a block level element behave differently.
There's also the existing style block syntax for infoboxes that can be extended to support more customization:
::: Someotherclass
alert
:::
Collaborator
|
There's also the argument that |
69d502f to
47937a5
Compare
fff41ba to
f332aa7
Compare
Member
Author
|
went all in with style blocks, see PR description for the syntax I chose. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #13064 (with applied feedback from
#osu-wiki)Enabled for wiki and news.
Also supports an inline variant per wiki maintainer request.
Preview
Initial implementation commentary
initial implementation used the GitHub custom syntax detailed in the linked issue via a custom parser. after a conversation with clayton and Wala in
#osu-wiki(link), we decided it would be best to rework this using existing syntax ofCustomContainerInline(similar to flags), and let CSS selectors do the heavy lifting, which eliminates the need of custom parsers altogether.finalized syntax is the following:
this results in an alert.

> ::{alert=note}:: **See also:** [Ranking criteria](/wiki/Ranking_criteria) and [Beatmap ranking procedure](/wiki/Beatmap_ranking_procedure)this results in an inline alert.

Available styleblock attributes are:
::: alert-note::: alert-tip::: alert-notice::: alert-warning::: alert-cautionSyntax is the following:
This results in an inline/compact alert.

This results in a regular alert.
