mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-09 21:42:15 +00:00
No easy access to label for links that use reference links #411
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ErikSchierboom on GitHub (Nov 1, 2020).
When working with inline links, the behavior of the
LabelSpanproperty seems to be inconsistent between inline links that use reference links and those that do not.This is best demonstrated with an example.
Suppose we're parsing the following Markdown
using the following code:
Then if I use the Span, LabelSpan and UrlSpan properties to output the corresponding Markdown in the document, I get the following:
First link (using the reference link):
"[Link using reference][valid-file]""valid-file""./valid-file-link.md"Second link (not using the reference link):
"[Link without reference](/valid-file-link.md)""Link without reference""/valid-file-link.md"I would have expected the
LabelSpanproperty of the first link to returnLink using reference, notvalid-file.Am I doing something wrong or is this expected behavior?
@MihaZupan commented on GitHub (Nov 1, 2020):
The behavior looks wrong here. We're also not setting the
Labelfor[foo](bar)case.@ErikSchierboom commented on GitHub (Nov 9, 2020):
@MihaZupan I've opened PR #488 to fix this issue. Is there anything I should be doing to get the PR reviewed?