Debian Codegraph @

src/tests/fixtures/alerts.md

raw
1 ---
2 title: Alerts
3 based_on: https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/alerts.md
4 ---
5
6 ## Alerts
7
8 GitHub style alerts look like this:
9
10 ```````````````````````````````` example
11 > [!NOTE]
12 > Highlights information that users should take into account, even when skimming.
13 .
14 <div class="markdown-alert markdown-alert-note">
15 <p class="markdown-alert-title">Note</p>
16 <p>Highlights information that users should take into account, even when skimming.</p>
17 </div>
18 ````````````````````````````````
19
20 It shouldn't matter if there's a soft break or hard break after
21 the `[!NOTE]`:
22
23 ```````````````````````````````` example
24 > [!NOTE]
25 > Highlights information that users should take into account, even when skimming.
26 .
27 <div class="markdown-alert markdown-alert-note">
28 <p class="markdown-alert-title">Note</p>
29 <p>Highlights information that users should take into account, even when skimming.</p>
30 </div>
31 ````````````````````````````````
32
33 Uppercase isn't required:
34
35 ```````````````````````````````` example
36 > [!note]
37 > Highlights information that users should take into account, even when skimming.
38 .
39 <div class="markdown-alert markdown-alert-note">
40 <p class="markdown-alert-title">Note</p>
41 <p>Highlights information that users should take into account, even when skimming.</p>
42 </div>
43 ````````````````````````````````
44
45
46 Alerts can contain multiple blocks:
47
48 ```````````````````````````````` example
49 > [!NOTE]
50 > Highlights information that users should take into account, even when skimming.
51 >
52 > Paragraph two.
53 .
54 <div class="markdown-alert markdown-alert-note">
55 <p class="markdown-alert-title">Note</p>
56 <p>Highlights information that users should take into account, even when skimming.</p>
57 <p>Paragraph two.</p>
58 </div>
59 ````````````````````````````````
60
61 Other kinds of alerts:
62
63 ```````````````````````````````` example
64 > [!TIP]
65 > Optional information to help a user be more successful.
66 .
67 <div class="markdown-alert markdown-alert-tip">
68 <p class="markdown-alert-title">Tip</p>
69 <p>Optional information to help a user be more successful.</p>
70 </div>
71 ````````````````````````````````
72
73 ```````````````````````````````` example
74 > [!IMPORTANT]
75 > Crucial information necessary for users to succeed.
76 .
77 <div class="markdown-alert markdown-alert-important">
78 <p class="markdown-alert-title">Important</p>
79 <p>Crucial information necessary for users to succeed.</p>
80 </div>
81 ````````````````````````````````
82
83 ```````````````````````````````` example
84 > [!WARNING]
85 > Critical content demanding immediate user attention due to potential risks.
86 .
87 <div class="markdown-alert markdown-alert-warning">
88 <p class="markdown-alert-title">Warning</p>
89 <p>Critical content demanding immediate user attention due to potential risks.</p>
90 </div>
91 ````````````````````````````````
92
93 ```````````````````````````````` example
94 > [!CAUTION]
95 > Negative potential consequences of an action.
96 .
97 <div class="markdown-alert markdown-alert-caution">
98 <p class="markdown-alert-title">Caution</p>
99 <p>Negative potential consequences of an action.</p>
100 </div>
101 ````````````````````````````````
102
103 A title can be specified to override the default title:
104
105 ```````````````````````````````` example
106 > [!NOTE] Pay attention
107 > Highlights information that users should take into account, even when skimming.
108 .
109 <div class="markdown-alert markdown-alert-note">
110 <p class="markdown-alert-title">Pay attention</p>
111 <p>Highlights information that users should take into account, even when skimming.</p>
112 </div>
113 ````````````````````````````````
114
115 The title does not process markdown and is escaped:
116
117 ```````````````````````````````` example
118 > [!NOTE] **Pay** attention <script>
119 > Highlights information that users should take into account, even when skimming.
120 .
121 <div class="markdown-alert markdown-alert-note">
122 <p class="markdown-alert-title">**Pay** attention &lt;script&gt;</p>
123 <p>Highlights information that users should take into account, even when skimming.</p>
124 </div>
125 ````````````````````````````````
126
127 They work in the same places as a normal blockquote would, such as in a list item:
128
129 ```````````````````````````````` example
130 - Item one
131
132 > [!NOTE]
133 > Highlights information that users should take into account, even when skimming.
134 .
135 <ul>
136 <li>
137 <p>Item one</p>
138 <div class="markdown-alert markdown-alert-note">
139 <p class="markdown-alert-title">Note</p>
140 <p>Highlights information that users should take into account, even when skimming.</p>
141 </div>
142 </li>
143 </ul>
144 ````````````````````````````````
145
146