xoofx / xoofx/markdig

Replacing LinkInline with reference form - how?

Open
#752 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
C#
Stars
5.3k
Forks
510
Avg merge
8d 5h
Merged PRs (30d)
5

Description

Trying to find documentation and I get the idea I am either not finding it - but neither is my AI.

I need to import a markdown document (thousands actually) and extract all the links so they can be maintained separately.

I found them using

    foreach (var node in document.Descendants())
    {
        if (node is LinkInline link)
        {
            var url = link.Url;
            //var linkText = link.FirstChild.ToString();

probem is- what do I replace them with if I then add the references? I have the key - i Just have no idea what to put there.

It seems nto toto be a LinkReferenceDefinition - that is for the references. SO what do I replace it with? The LinkReferenceDefinition can not be it, or?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the LinkInline and LinkReferenceDefinition types mentioned in the issue, then trace how reference links are represented when parsing a Markdown document. Done means documenting which node replaces an extracted LinkInline and how its key connects to a reference definition.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.