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
Issue with nested block-quote md syntax #50
Comments
Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗 |
does markdown-it-py parse that string properly as well? Does this error only pop up when used in conjunction with jupytext? |
I'll copy the traceback you added on slack: File "/Users/matthewmckay/anaconda3/envs/tomyst/lib/python3.8/site-packages/markdown_it/parser_block.py", line 58, in tokenize
state.line = line = state.skipEmptyLines(line)
File "/Users/matthewmckay/anaconda3/envs/tomyst/lib/python3.8/site-packages/markdown_it/rules_block/state_block.py", line 134, in skipEmptyLines
if (self.bMarks[from_pos] + self.tShift[from_pos]) < self.eMarks[from_pos]:
IndexError: list index out of range This is likely due to a porting issue in JS->Python whereby markdown-it works IMO a bit through luck rather than judgement in some places, in that JS does not raise an >> a = [1, 2, 3]
>> console.log(a[4])
undefined
>> console.log(a[4] > 1)
false so the fix will be something along the lines of: if from_pos < len(self.eMarks) and (self.bMarks[from_pos] + self.tShift[from_pos]) < self.eMarks[from_pos]: |
thanks @chrisjsewell -- that syntax was the only change in a revision build of the migration for lecture-python-programming through https://github.com/QuantEcon/sphinxcontrib-tomyst/pull/61/files. I can't replicate this in a seperate |
Describe the bug
The following markdown snippet causes
jupytext
conversion to fail with error (IndexError: list index out of range
)Is this an issue with nested literals?
It appears to be valid
md
using https://spec.commonmark.org/dingus/.To Reproduce
Add snippet to any
md
documentrun
jupytext doc.md --to ipynb
Expected behavior
successful transfer to
ipynb
Environment
markdown_it_py = 0.5.4
The text was updated successfully, but these errors were encountered: