marimo
marimo copied to clipboard
Automatic `View as markdown` not working as expected
Description
Hi, I usually edit marimo files as .md files from emacs (they are automatically exported from an org-mode file).
When there's a bit of markdown in the .md file, and I load the file for the first time, each cell will show as code (containing a mo.md call). I can then click on the View as markdown button to change it in a markdown cell, and then I can click on the hide the source to get what I really want, i.e. the rendered markdown.
Now, I get that at the beginning, all cells, including markdown ones, are code, because I might want to interpolate values in the md cell, but the notebook is set up as run on startup (and on save). It would be nice if I could cut on the number of clicks I have to do to get to the rendered markdown (for now, 2 clicks per cell).
Suggested solution
I would suggest a configuration option that says: If the cell has been evaluated (and is now markdown), just hide the source automatically. What do you guys think?
Alternative
No response
Additional context
No response
What version are you running? Because I think with the newest codeblock form this is the default?
But yup! markdown should be clean on render
>>> marimo.__version__
'0.11.7'
which should be the latest according to pypi!
As a workaround for now, — there is a hide all markdown code action in the command palette (Cmd/Ctrl+k).
Can you send me a screenshot of opening marimo/_tutorials/markdown_format.md?
/ share what your org-mode export looks like? Cannot seem to replicate
@meditans is this still happening to you?
No, the original issue doesn't happen anymore @mscolnick, thank you. I can do hide all markdown code, but I would welcome if this happened automatically, as I have to do it again every time I create a new cell.
@meditans we now do auto-hide markdown when created (after interacting with it once)
I'm a bit confused about this feature. This is what I see on first load when I run in edit mode. It is not rendering markdown.
The following is what I WANT to see -- but I can only see it by pressing "play" on each markdown cell. Is this because my notebook is set to lazy evaluation?
- I do NOT want automatic evaluation (this would trigger all kinds of side effects I don't want)
- i DO want markdown interspersed with code, by default.
@sandover yes, this is because markdown is not run during lazy-evaluation. there is this ticket which you might be interested in following: https://github.com/marimo-team/marimo/issues/5942