-
-
Notifications
You must be signed in to change notification settings - Fork 44
Closed
Labels
🐛 type/bugThis is a problemThis is a problem💪 phase/solvedPost is donePost is done🗄 area/interfaceThis affects the public interfaceThis affects the public interface🧑 semver/majorThis is a changeThis is a change
Description
Background: I'm converting node.js from marked to unified/remark/rehype, and found a regression. It seems that mdast-util-to-hast intentionally does not have a fallback for link references:
mdast-util-to-hast/test/link-reference.js
Lines 22 to 44 in f2e3ec5
| t.deepEqual( | |
| to( | |
| u( | |
| 'linkReference', | |
| { | |
| identifier: 'delta', | |
| referenceType: 'full' | |
| }, | |
| [u('text', 'echo')] | |
| ) | |
| ), | |
| u( | |
| 'element', | |
| { | |
| tagName: 'a', | |
| properties: { | |
| href: '' | |
| } | |
| }, | |
| [u('text', 'echo')] | |
| ), | |
| 'should not fall back on full `linkReference`s' | |
| ) |
This varies from the commonmark spec and other implementations:
https://spec.commonmark.org/0.28/#full-reference-link
https://spec.commonmark.org/dingus/?text=[foo][bar]
Is there a reason for this deviation?
Metadata
Metadata
Assignees
Labels
🐛 type/bugThis is a problemThis is a problem💪 phase/solvedPost is donePost is done🗄 area/interfaceThis affects the public interfaceThis affects the public interface🧑 semver/majorThis is a changeThis is a change