GitHub markdown, alerts are not working when they have been indented #118296
Replies: 12 comments 2 replies
|
I am having the same issue, it should be a bug as I don't have this issue when I am previewing the same file in VS Code. It's been three months since this question was created, could someone from Github help here? |
|
I'm having the same issue. i.e. This works when the Alert is at the beginning of line:
Note This is a note that creates the Alert icon correctly. This doesn't work, when I try to align with another paragraph by adding three spaces in front of the line:
|
|
The documentation for alerts does state:
I agree with @kasir-barati that this restriction should be considered further because it severely limits the utility of alerts. |
|
+1 to having Alerts work in nested elements. At the very least, I'd love if they would work inside collapsed sections because that really helps to have easy-to-read |
This comment was marked as spam.
This comment was marked as spam.
|
π ing and adding my use case: a Note admonition associated with an item in a bulleted list. Example: But the admonition renders as a block quote due to 4 spaces required to keep the bulleted list going:
Note The the literal You can elide the four spaces and the admonition will render correctly, but the bulleted list will not continue:
Note The variable code is defined in foo.bar
Caution The the literal You can manually change the numbers, but of course that relies on users noticing and correcting the problem, which in practice doesn't happen as often as you'd like |
|
Another use case is an alert inside a Example<details>
<summary>Click to expand</summary>
Other _Markdown_ elements work.
> [!NOTE]
> But an alert does not work since it is "nested", even though it is not indented.
</details>ResultClick to expandOther Markdown elements work.
|
|
I'd like to upvote this issue β I also found all the use cases mentioned above quite problematic, since alert panels nested within a bulleted list are not a rare use case. It would be super cool if you could extend it ππ» |
|
Sadly this is still unanswered |
|
I'd love to see GitHub reconsider the current state of not allowing Alerts to be nested inside of other elements. Having to keep Alerts (which I love) outside of collapsible content makes for very ugly and inconsistent-looking documentation. Please consider adding the ability to nest Alerts inside of other elements! |
|
Indented Alerts work fine on GitLab, would be nice if GitHub can fix this problem. |
|
Like many others before me, I'm here to express my support of this issue. |
Uh oh!
There was an error while loading. Please reload this page.
Select Topic Area
Product Feedback
Body
Hi dear community,
I am fond of how beautiful are alerts in GitHub markdowns and I am using them whenever needed but I realized today that if I indent them GitHub cannot render them. Just look at this repo: https://github.com/kasir-barati/you-say
In this section I am indenting the "caution" to show that it is part of that list but to no avail, it is not working the way it does when I am not indenting it
Here I attach two screen shots:


Working case -- without indentation:
Broken case -- with indentation:
Are we restricted/limited to use them just without indentation? if yes where can I open an issue for them so we can discuss it further to see if it is viable and logically speaking practical to be added.
Many thanks
All reactions