Skip to content

Generating broken links for certain symbol combinations in markdown files #9518

@jellyfith

Description

@jellyfith

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

There seems to be a bug in resolving broken links when certain symbols are used in conjunction.

example:

[`Type1`](some_doc.md#type1)\<[`Type2`](some_doc.md#type2)\>

This example generates a broken link to some_doc.md#type2

Here is a link to a sandbox with the error reproduced. Note the ./docs/index.md file for the broken bits.

Reproducible demo

https://codesandbox.io/p/sandbox/fervent-joana-2wypc8

Steps to reproduce

In a markdown file, add links using the following symbols:

[`Type1`](some_doc.md#type1)\<[`Type2`](some_doc.md#type2)\>

Expected behavior

A link is generated that looks like this:

<a href="/docs/some_doc#type1"><code>Type1</code></a>&lt;<a href="/docs/some_doc#type2"><code>Type2</code></a>&gt;

Actual behavior

A link is generated that looks like this:

<a href="/docs/some_doc#type1"><code>Type1</code></a>&lt;<a href="/docs/some_doc.md#type2"><code>Type2</code></a>&gt;

Your environment

No response

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