Closed afeld closed 1 year ago
Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:
But instead some are indented two spaces, while some are indented three.
The logic here is as follows:
indent width of ordered lists depends on the width of the initial number of the ordered list
1. Here indent width is
three.
123. Here indent width is
five. It needs to be so, because
Otherwise this next paragraph doesn't belong in the same list item.
This is a problem because I'm publishing that notebook via JupyterBook, and it's Markdown parser only seems to support nested lists indented 3+ spaces.
Hmm, are you 100% sure about this? I'm doubtful, because JupyterBook uses myst-nb which uses myst-parser which uses markdown-it-py to parse Markdown, and that is a CommonMark compliant parser which happens to be the same exact parser used by mdformat.
I published mdformat-mkdocs to format list indents to 4-spaces, which might be helpful for your use case
This is a problem because I'm publishing that notebook via JupyterBook, and it's Markdown parser only seems to support nested lists indented 3+ spaces.
Closing, as this issue should be fixed now by installing KyleKing's mdformat-mkdocs plugin.
Describe the bug
context When I run MdFormat on this notebook through nbqa…
expectation I expected to get nested lists indented a certain number of spaces.
bug But instead some are indented two spaces, while some are indented three.
problem This is a problem because I'm publishing that notebook via JupyterBook, and it's Markdown parser only seems to support nested lists indented 3+ spaces.
cc https://github.com/executablebooks/mdformat/issues/331#issuecomment-1224279288 for the option to make that configurable for more fragile Markdown parsers
Reproduce the bug
Run Mdformat through nbqa:
List your environment