Skip to content

A line break inside a markdown link will break url rendering #9523

Closed as not planned

Description

@chromy96

Have you read the Contributing Guidelines on issues?

Prerequisites

Description

Two URLs containing a file path to the same document will be rendered differently depending on if the link text contains a line break or not.

Properly rendered url (points to website/docs/example)

[A link example](example.md)

Badly rendered url (points to website/example.md)

[A link
example](example.md)

Docusaurus version: 3.0.0

Reproducible demo

No response

Steps to reproduce

  1. Create a link with a line break in it
  2. Check how the URL is rendered

Expected behavior

Expected a URL to be rendered the same way as without the line break.

Actual behavior

A link points to website/example.md instead of website/docs/example

Your environment

  • Public source code:
  • Public site URL:
  • Docusaurus version used: 3.0.0
  • Environment name and version (e.g. Chrome 89, Node.js 18.2): Chrome 119, Node.js 18.2
  • Operating system and version (e.g. Ubuntu 20.04.2 LTS): Ubuntu 20.04

Self-service

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

Activity

  1. added
    bug
    status: needs triage
    on Nov 9, 2023
  2. Josh-Cena commented on Nov 9, 2023

    @Josh-Cena
    Collaborator

    This is currently working as intended because we only process links line-by-line. We can investigate making it multiline but I wonder if it would be as trivial as the other Markdown link bugs. We'll soon use an actual Markdown parser for this.

  3. added
    domain: markdown
    and removed
    status: needs triage
    on Nov 9, 2023
  4. slorber commented on Nov 10, 2023

    @slorber
    Collaborator

    Closing as duplicate of #9048

    This bug is only there because we don't use MDX/Remark/micromark to resolve links using filename extensions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugdomain: markdown

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions