docusaurus-openapi-docs icon indicating copy to clipboard operation
docusaurus-openapi-docs copied to clipboard

MDX compilation fails with Docusaurus v3

Open TheCatLady opened this issue 1 year ago • 1 comments

Describe the bug

Error: MDX compilation failed for file "<redacted>"
Cause: Expected a closing tag for `<div>` (30:1951-30:1956) before the end of `paragraph`
Details:
{
  "name": "30:1-30:1956",
  "message": "Expected a closing tag for `<div>` (30:1951-30:1956) before the end of `paragraph`",
  "reason": "Expected a closing tag for `<div>` (30:1951-30:1956) before the end of `paragraph`",
  "line": 30,
  "column": 1,
  "position": {
    "start": {
      "line": 30,
      "column": 1,
      "offset": 1584,
      "_index": 0,
      "_bufferIndex": 0
    },
    "end": {
      "line": 30,
      "column": 1956,
      "offset": 3539,
      "_index": 1,
      "_bufferIndex": -1
    }
  },
  "source": "mdast-util-mdx-jsx",
  "ruleId": "end-tag-mismatch"
}

Expected behavior

Successful compilation

Current behavior

MDX compilation fails

Possible solution

Steps to reproduce

  1. Update Docusaurus package versions in package.json to 3.0.0-alpha.0
  2. yarn
  3. yarn build

Context

Just testing the brand-new Docusaurus v3 alpha for now to find potential migration issues, but would like to upgrade later when v3 enters beta or has a stable release.

Your Environment

  • Version used: 0.0.0-beta.660

TheCatLady avatar Jun 15 '23 16:06 TheCatLady

@sserrata See https://github.com/facebook/docusaurus/discussions/9053#discussioncomment-6304912 for an explanation of the issue. I suspect adding newlines throughout would resolve this problem?

Additionally, {, <, and > characters in descriptions need to be escaped as {'{'}, {'<'}, and {'>'}, respectively.

TheCatLady avatar Jun 29 '23 17:06 TheCatLady