-
Notifications
You must be signed in to change notification settings - Fork 334
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
Can the number of backticks used for Jupyter notebook code cell be specified? #8919
Comments
That's unrelated to Quarto. Note that your example has no code cells. Code cells describe a Markdown code block where its8 content can be used for computation. See below.
|
For more help: Could you share a small self-contained "working" (reproducible) example to work with, i.e., a complete Quarto document or a Git repository? Thanks. You can share a self-contained "working" (reproducible) Quarto document using the following syntax, i.e., using more backticks than you have in your document (usually four If you have multiple files (and if it is absolutely required to have multiple files), please share as a Git repository.
Additionally and if not already given, please share the output of |
Sorry my example was not very clear. I am using What happens is when the notebook contains a code cell, the produced mdx file contains the markdown representation of that code cell using 3 backticks as the fence. The issue is that the code cell itself contained a string with 3 backticks too, which breaks the rendering. Normally, I would make the outer codefence use 4 or more backticks to resolve this but quarto (or pandoc?) is the one doing this translation I can't seem to do that. |
I know, I saw "(In my case docusaurus, so mdx)", but knowing this does not make your example more reproducible. |
Sent the message too soon - see the updated content above. |
Yeah, this is definitely a bug on our side. |
I think its related to docusaurus because when I was trying to get a standalone repro (just jupyter -> markdown) it was correctly using 4 instead of 3 backticks in the above example. But in the more complex situation of file being inside of a docusaurus site I was seeing the issue |
For the markdown only example that did work I get the following output:
But the docusaurus version outputs:
Does |
It does, but you don't need that. Here's another instance of the issue:
That's already broken. |
I can confirm that rendering the same notebook and just ensuring the target format is md instead of the default mdx it uses the correct code fence (4 backticks when it needs it)
|
Oh awesome, that repro is much better then |
With your example if you run it like this:
It works, but if you convert it like you said it doesn't work. |
Funnily enough, it's two bugs. I fixed the first one in a branch and yet the following is still broken:
|
Fixed on |
Bug description
I have a code cell in a notebook which contains a string with a markdown code block in it. This breaks the rendering of the outputted markdown content. Is it possible to configure the number of backticks that are used when outputting a code cell form a notebook to markdown? (In my case docusaurus, so mdx)
Steps to reproduce
The following would be the contents of the cell:
Which gets rendered is:
This does not render correctly
Expected behavior
No response
Actual behavior
No response
Your environment
Quarto check output
The text was updated successfully, but these errors were encountered: