[PR #842] [MERGED] Check that the alert candidate is not already in an alert block or nested within other elements. #1251

Open
opened 2026-01-29 14:52:07 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/xoofx/markdig/pull/842
Author: @snnz
Created: 1/2/2025
Status: Merged
Merged: 1/5/2025
Merged by: @xoofx

Base: masterHead: fix-alerts


📝 Commits (2)

  • f2590e7 Check that the alert candidate is not already in an alert block or nested within other elements.
  • d87bb72 A test has been added.

📊 Changes

2 files changed (+29 additions, -1 deletions)

View changed files

📝 src/Markdig.Tests/MiscTests.cs (+27 -0)
📝 src/Markdig/Extensions/Alerts/AlertInlineParser.cs (+2 -1)

📄 Description

Fixes #841.

The second condition is related to the following GitHub Markdown update note:

  • Prevent alerts from being nested within other elements.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/xoofx/markdig/pull/842 **Author:** [@snnz](https://github.com/snnz) **Created:** 1/2/2025 **Status:** ✅ Merged **Merged:** 1/5/2025 **Merged by:** [@xoofx](https://github.com/xoofx) **Base:** `master` ← **Head:** `fix-alerts` --- ### 📝 Commits (2) - [`f2590e7`](https://github.com/xoofx/markdig/commit/f2590e7b809c9b36dfbd2afcfdab185ae1fdcfce) Check that the alert candidate is not already in an alert block or nested within other elements. - [`d87bb72`](https://github.com/xoofx/markdig/commit/d87bb7292d550f95c0088454b96fc97e5de6e052) A test has been added. ### 📊 Changes **2 files changed** (+29 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/Markdig.Tests/MiscTests.cs` (+27 -0) 📝 `src/Markdig/Extensions/Alerts/AlertInlineParser.cs` (+2 -1) </details> ### 📄 Description Fixes #841. The second condition is related to the following GitHub Markdown [update note](https://github.com/orgs/community/discussions/16925): > - Prevent alerts from being nested within other elements. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 14:52:07 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#1251