Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested link references definitions can be used at the top-level #60

Open
dillonkearns opened this issue Oct 2, 2020 · 0 comments
Open
Labels
hacktoberfest help wanted Extra attention is needed

Comments

@dillonkearns
Copy link
Owner

Link references affect the entire document, not just the container in which they are defined

https://github.com/dillonkearns/elm-markdown/blob/master/test-results/failing/GFM/Link%20reference%20definitions.md#example-187

See also the rest of the failing cases in that file for context.

Here's where the link reference definition parsing is done and the definitions are added to the dict:

, LinkReferenceDefinition.parser
|> Advanced.backtrackable
|> map (\reference -> Loop (addReference revStmts reference))

And here's where the inline parsing is done and receives the dict of reference definitions:

Markdown.InlineParser.parse mappedReferencesDict unparsedInlines
|> List.map mapInline

This is likely a more challenging fix, so not as well suited to a first-time contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant