Skip to content

Regression in v3: admonitions in nested lists are not recognized as markup elements #9507

@hrumhurum

Description

@hrumhurum

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

Docusaurus v3.0.0 has a regression in admonitions handling when they are placed inside a list. They are not treated as markup elements while admonitions placed outside of the list are treated correctly.

Reproducible demo

https://stackblitz.com/edit/github-42617b?file=docs%2Fintro.md

Steps to reproduce

1. Item 1

2. Item 2

   :::info Important Considerations
   For better experience, try to keep the upgrade experience smooth.
   :::

:::info Important Considerations
For better experience, try to keep the upgrade experience smooth.
:::

Expected behavior

Both admonitions should be rendered as admonitions.

Actual behavior

  1. The admonition inside the list is not treated as markup element and rendered as a raw text instead of an admonition element
  2. The admonition outside of the list is rendered correctly

Your environment

  • Docusaurus version used: 3.0.0
  • Environment name and version (e.g. Chrome 89, Node.js 16.4): Chrome 119, Node.js v18.16.0
  • Operating system and version (e.g. Ubuntu 20.04.2 LTS): Windows 11

Self-service

  • I'd be willing to fix this bug myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn error in the Docusaurus core causing instability or issues with its executiondomain: markdownRelated to Markdown parsing or syntax

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions