-
Notifications
You must be signed in to change notification settings - Fork 86
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
*always* use jupytext to read in markdown files? #88
Comments
When we move to utilising jupytext, we will certainly be assessing/categorizing every ```python
print("hi")
``` whereas if you now add a myst type code cell it would treat it as 1 markdown cell and 1 code cell: ```python
print("hi")
```
```{code-cell} python
print("there")
``` The other difference with using This is not available for any other format, and can't be utilised (currently) directly from |
ah that's a good point - propagating line numbers is a good reason to use our own function, I think. Though I guess that jupytext.reads is using In that case, perhaps we should start by only using the myst parser, and using the myst_to_notebook function if a notebook is detected (which I guess would be done with a quick check for any |
Yes, this is where Another subtle point for consideration, is if the user end up having both notebook.ipynb and notebook.md in the sphinx source folder. Currently, I think sphinx just arbitrarily picks the extension relating to the first parser to be loaded. I raised an issue about it in sphinx-doc/sphinx#7324 |
I think this would also require us to write our own parser for markdown files, right? If we wanted people to be able to write myst-nb markdown in |
i.e. #83 |
I just wanna check my intuition here. Now that jupytext can read myst-markdown, why don't we simply always use jupytext to load in any markdown or ipynb file? If the file is not a "myst-notebook" style, then it'll simply be read in as a single markdown cell in a notebook, and then the parser should just treat it exactly as it would treat a regular
.md
file. If the file does have myst notebook syntax, then it will properly be read as a notebook. Any reason not to take this approach?The text was updated successfully, but these errors were encountered: