question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Link definitions not propogated to nested parser

See original GitHub issue

Currently, link definitions cannot be used inside directives, e.g.

```{note}
[reference]
```

[reference]: https://github.com/ExecutableBookProject

will not work, but this will:

```{note}
[reference]

[reference]: https://github.com/ExecutableBookProject
```

This will also be the case for upcoming footnotes

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
chrisjsewellcommented, Mar 9, 2020

Actually I’m not sure if this is strictly part of the CommonMark spec (see this interactive demo). I’ll have to see in mistletoe-ebp, if storing all potential definition reference as ‘pending references’ breaks any tests, because this would make things a little easier.

1reaction
chrisjsewellcommented, Mar 9, 2020

I’m not sure of an ideal solution off-hand; just somehow you need to ‘defer’ the processing of Markdown span tokens until you’ve found all possible link/footnote definitions.

It’s a bit of a peculiarity of Markdown, that for example, you can’t just identify the references through a regex, then store them for later replacement with the definitions, because whether or not they can be immediately resolved can have a direct bearing on how the subsequent text is parsed.

For example, this:

[a*b]*

[a*b]: asd

Is parsed to this

a*b*

but if the definition is not available:

[c*d]*

[cd]

Read more comments on GitHub >

github_iconTop Results From Across the Web

FParsec backtracking in nested parser - Stack Overflow
But now I want to parse it with FParsec and I don't get the inner parser to not be greedy. My current parsers...
Read more >
"unknown" option should apply to nested fields so ... - GitHub
I copied from Meta.exclude , but linked to Schema(exclude) . ... (Note: does not propagate to nested fields.) Use EXCLUDE, INCLUDE or RAISE....
Read more >
Data Extraction: Parse a 3-Nested JSON Object and Convert it ...
Data Extraction: Parse a 3-Nested JSON Object and Convert it to a pandas dataframe. Reference: Jason Bourne Poster.
Read more >
Resolving problems when using messages - IBM
Use the advice given here to help you to resolve common problems that can arise when you use messages.
Read more >
Parsing - Datadog Docs
Some examples demonstrating how to use parsers: Key value or logfmt; Parsing dates; Alternating patterns; Optional attribute; Nested JSON; Regex; List and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found