tommilligan / mdbook-admonish

A preprocessor for mdbook to add Material Design admonishments.
MIT License
176 stars 20 forks source link

Admonishments inside lists restarts numbering #123

Closed mattburgess closed 1 year ago

mattburgess commented 1 year ago

I have the following Markdown:

1. Thing one

   ```sh
   $ echo "Thing one"
  1. Thing two

    $ echo "Thing two"
  2. Thing three

    $echo $Thing three"
    **Do not** run this
  3. Thing 4

    $ echo "Thing four"

This doesn't quite get rendered correctly:

  1. The admonishment isn't indented to align with the list item's text; instead it's aligned with the list numbers.
  2. "Thing 4" gets rendered in its own <ol> resulting in the numbering starting from 1 again, instead of it continuing at 4.
tommilligan commented 1 year ago

Hi, thanks for reporting this issue! I believe I've found the underlying cause - a fix is just running through CI now: #124

If you're able to, please install that branch directly and see if it fixes your use case:

cargo install --git https://github.com/tommilligan/mdbook-admonish --branch bug-123
mattburgess commented 1 year ago

Wow, what a fantastically quick response. Works perfectly here. Thanks very much!