Multi-line Alerts

Simple container

$ comrak -e alerts -e multiline-block-quotes
>>> [!NOTE]
*content*
>>>

Other kinds of alerts:

$ comrak -e alerts -e multiline-block-quotes
>>> [!TIP]
Optional information to help a user be more successful.
>>>
$ comrak -e alerts -e multiline-block-quotes
>>> [!IMPORTANT]
Crucial information necessary for users to succeed.
>>>
$ comrak -e alerts -e multiline-block-quotes
>>> [!WARNING]
Critical content demanding immediate user attention due to potential risks.
>>>
$ comrak -e alerts -e multiline-block-quotes
>>> [!CAUTION]
Negative potential consequences of an action.
>>>

A title can be specified to override the default title:

$ comrak -e alerts -e multiline-block-quotes
>>> [!NOTE] Pay attention
Highlights information that users should take into account, even when skimming.
>>>

Can contain block elements

$ comrak -e alerts -e multiline-block-quotes
>>> [!NOTE]
### heading

-----------
>>>

Ending marker can be longer

$ comrak -e alerts -e multiline-block-quotes
>>>>>> [!NOTE]
  hello world
>>>>>>>>>>>
normal

Nested alerts

$ comrak -e alerts -e multiline-block-quotes
>>>>> [!NOTE]
>>>> [!CAUTION]
foo
>>>>
>>>>>

Incorrectly nested alerts

$ comrak -e alerts -e multiline-block-quotes
>>>> [!NOTE]
this block is closed with 5 markers below

>>>>>

auto-closed blocks
>>>>>
>>>>

Marker can be indented up to 3 spaces

$ comrak -e alerts -e multiline-block-quotes
   >>>> [!NOTE]
   first-level blockquote
    >>> [!CAUTION]
    second-level blockquote
    >>>
   >>>>
   regular paragraph

Fours spaces makes it a code block

$ comrak -e alerts -e multiline-block-quotes
    >>>
    content
    >>>

Detection of embedded 4 spaces code block starts in the column the alert starts, not from the beginning of the line.

$ comrak -e alerts -e multiline-block-quotes
  >>> [!NOTE]
      code block
  >>>
$ comrak -e alerts -e multiline-block-quotes
   >>>> [!NOTE]
   content
    >>> [!CAUTION]
        code block
    >>>
   >>>>

Closing marker can’t have text on the same line

$ comrak -e alerts -e multiline-block-quotes
>>> [!NOTE]
foo
>>> arg=123

Alerts self-close at the end of the document

$ comrak -e alerts -e multiline-block-quotes
>>> [!NOTE]
foo

They should terminate paragraphs

$ comrak -e alerts -e multiline-block-quotes
blah blah
>>> [!NOTE]
content
>>>

They can be nested in lists

$ comrak -e alerts -e multiline-block-quotes
 -  >>> [!NOTE]
    - foo
    >>>

Or in blockquotes

$ comrak -e alerts -e multiline-block-quotes
> >>> [!NOTE]
> foo
>> bar
> baz
> >>>

List indentation

$ comrak -e alerts -e multiline-block-quotes
 -  >>> [!NOTE]
    foo
    bar
    >>>

 -  >>> [!NOTE]
    foo
    bar
    >>>

Ignored inside code blocks:

$ comrak -e alerts -e multiline-block-quotes
```txt
# Code
>>> [!NOTE]
# Code
>>>
# Code
```

Does not require a leading or trailing blank line

$ comrak -e alerts -e multiline-block-quotes
Some text
>>> [!NOTE]
A quote
>>>
Some other text