I'm moving one of my courses from nbsphinx to myst-nb, and have hit an issue with a commented link causing myst to hang. Specifically, this line is ignored by nbsphinx, but causes the myst parser to go into an infinite loop printing the message:
"WARNING: /Users/phil/repos/MyST-NB/docs/examples/austin_issue/lab7/lab7.ipynb:2:1 {'cell_index': 28} ignoring duplicate link definition 'lab7:prob:staggered'"
Ok, firstly @choldgraf note how the warning gives the correct notebook cell and line number 😄 (this is currently only for the source -> Markdown AST phase, not the Markdown -> docutils AST phase).
Secondly, going by the warning message, the error actually lies here, not to where you linked to. Checking it with mistletoe (the markdown parser), it does replicate this error:
$ mistletoe
mistletoe [version 0.10.0] (interactive)
Type Ctrl-D to complete input, or Ctrl-C to exit.
>>> [lab7:prob:staggered]:(#Problem-One)
... > Modify
:2:1 ignoring duplicate link definition 'lab7:prob:staggered'
...
This is only caused if there is no new line between the link definition and the quote,
whereby the line number for some reason is not being progressed (so it reads the same line infinitely)
As a stop gap, if you add a blank line, there should be no problem:
@phaustin thanks for the feedback
Ok, firstly @choldgraf note how the warning gives the correct notebook cell and line number 😄 (this is currently only for the source -> Markdown AST phase, not the Markdown -> docutils AST phase).
Secondly, going by the warning message, the error actually lies here, not to where you linked to. Checking it with mistletoe (the markdown parser), it does replicate this error:
The issue lies in the transition from link definition to quote block , somewhere around here: https://github.com/ExecutableBookProject/mistletoe-ebp/blob/d7247b52df3ff50dc71aef9ec3f8e7b316b03813/mistletoe/block_tokens.py#L821
This is only caused if there is no new line between the link definition and the quote, whereby the line number for some reason is not being progressed (so it reads the same line infinitely)
As a stop gap, if you add a blank line, there should be no problem:
Originally posted by @chrisjsewell in https://github.com/ExecutableBookProject/MyST-NB/pull/94