Skip to content

Shorthand link references not recognized when there's whitespace between [] #39

@nzakas

Description

@nzakas

Initial checklist

Affected packages and versions

[email protected]

Link to runnable example

https://stackblitz.com/edit/stackblitz-starters-ifpvft?file=index.js

Steps to reproduce

  1. Create a link reference with whitespace in between the []:
[foo][ ]

[foo]: https://example.com
  1. Pass into fromMarkdown()

Expected behavior

The returned AST should identify [foo][ ] as a linkReference. (It appears that GitHub does this. I'm unsure if that's standard behavior for Markdown or not. The Micromark GFM extension exhibits the same behavior.)

Actual behavior

The returned AST identifies [foo][ ] as text rather than a link reference.

Affected runtime and version

[email protected]

Affected package manager and version

No response

Affected OS and version

No response

Build and bundle tools

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    👎 phase/noPost cannot or will not be acted on🙅 no/wontfixThis is not (enough of) an issue for this project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions