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
[BUG] More than 1 Block Quote in Text causes IndexError when converting to ipynb #60
Comments
@chrisjsewell does |
I'd be happy to work on this -- but need to get familiar with this repo so any pointers would be helpful if you don't have time. |
This is not a known error though, the parser should literally never raise an exception (thats how HTML/Markdown parsers work). Its only really possible to fail "gracefully" for known failures. But I'll see if I can replicate the error now |
FYI, you know this is the same exception as #50. Its probably just this function that needs to be fixed and you won't get anymore errors |
I still can't replicate your exception. I added to the tox.ini: [testenv:py37-jupytext]
skip_install = true
deps = jupytext
commands = jupytext test.md --from myst --to ipynb
Can you try this |
these blockquote issues are really confusing. The issue in #50 I was having was embedded literal in a block quote. The issue reported here is having two blockquotes in a document and trying to transfer them using |
@chrisjsewell I did the above suggestion -- and it is running. Grr -- so confused on this issue as it keeps cropping up in the migrations. I edit the file down to those block quotes -- maybe there is some hidden |
The phantom exception 😂 |
Ah -- I got it. If there are two blank lines at the end it fails.
|
There you go thats the one 👍 |
but there is some interaction with having two (or more) |
and you only need this to reproduce:
|
done |
Just wait to merge #59 then I'll make a release |
Weirdly, in this very specific case, I still get this same error: https://gist.github.com/jackbentley/3accfd5dcb4721d1466d461f9eeb3729 Note that the blockquotes need to be inside a list and the file has to have at least 3 blank lines at the end of the file. It does not matter if the blockquote is the last item in the file or not. |
Describe the bug
If there are more than one block quotes in a
myst.md
file thenjupytext
(viamarkdown-it-py
) causesTo Reproduce
A minimal Example
and then run
jupytext f<ile.md> --to ipynb
Expected behavior
Notebook output with a single cell containing markdown and two block-quotes
Environment
Jupyter Book: 0.8.3
MyST-NB: 0.10.1
Sphinx Book Theme: 0.0.38
MyST-Parser: 0.12.10
Jupyter-Cache: 0.4.1
NbClient: 0.5.0
The text was updated successfully, but these errors were encountered: