Skip to content

Commit

Permalink
Add support for alerts (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
sandydoo authored Nov 1, 2023
1 parent 9de4e73 commit 2ec94fc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
10 changes: 10 additions & 0 deletions fixture.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@

<img src="image.png" width="182" align="right">

#### Alerts

> [!NOTE]
> Highlights information that users should take into account, even when skimming.
> [!IMPORTANT]
> Crucial information necessary for users to succeed.
> [!WARNING]
> Critical content demanding immediate user attention due to potential risks.
### Code snippet

Expand Down
9 changes: 9 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,15 @@ const ALLOW_CLASS = new Set([
'.contains-task-list',
'.task-list-item',
'.task-list-item-checkbox',
// For Markdown alerts.
'.markdown-alert',
'.color-fg-accent',
'.color-fg-attention',
'.color-fg-done',
'.text-semibold',
'.d-inline-flex',
'.flex-items-center',
'.mb-1',
]);

function extractStyles(rules, ast) {
Expand Down

0 comments on commit 2ec94fc

Please sign in to comment.