Skip to content

Broken link transformation #10072

Closed as not planned
Closed as not planned

Description

@iAdramelk

Have you read the Contributing Guidelines on issues?

Prerequisites

Description

.mdx extension is not removed from the link if the link text is split into two lines.

Reproducible demo

https://codesandbox.io/p/devbox/determined-northcutt-fdkm45?file=%2Fdocs%2Findex.mdx%3A5%2C1

Steps to reproduce

Put this code in the mdx file in the /docs/ folder (assuming that installation.mdx file exists in the same folder):

[Some
link](./installation.mdx)

[Some link](./installation.mdx)

Expected behavior

I expect that both links will be transformed to <a href="/docs/installation">Some link</a>.

Actual behavior

In practice, only the second link is transformed correctly. The first link is left as <a href="/installation.mdx">Some link</a>.

See the attached codesandbox demo.

Your environment

Self-service

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

Activity

  1. added
    bug
    status: needs triage
    on Apr 24, 2024
  2. iAdramelk commented on Apr 24, 2024

    @iAdramelk
    ContributorAuthor
  3. slorber commented on Apr 25, 2024

    @slorber
    Collaborator

    This is already tracked in #9048 and related to our linkify function

    I understand you'd be willing to attempt to fix it, but this is not so easy to migrate from processing docs as strings to ASTs so I'd rather solve this myself.

  4. added
    closed: duplicate
    and removed
    status: needs triage
    on Apr 25, 2024
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

    bugclosed: duplicate

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions