Skip to content
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

Ability to use f-string in the markdown editor #3895

Open
mscolnick opened this issue Feb 24, 2025 · 0 comments
Open

Ability to use f-string in the markdown editor #3895

mscolnick opened this issue Feb 24, 2025 · 0 comments

Comments

@mscolnick
Copy link
Contributor

Discussed in #3884

Originally posted by Warning39 February 22, 2025
I made the following comments in an issue - #3762 (comment) that I logged earlier.

There is a bit of extra friction with that limitation. I've noticed that the markdown editor in marimo only works with r strings and not f or rf strings. Is there a reason for that limitation?

So instead of being able to type this into the markdown editor:

### Some Heading

<img src="public/SolarEnergyDistribution.png" width="600"/>

Some formula $F = ma$ 

I have to edit via the code editor as opposed to the markdown editor, i.e.

mo.md(rf"""
### Some Heading

{mo.image("public/SolarEnergyDistribution.png", width=600)}

Some formula $F = ma$
""")

@mscolnick replied with:

Regarding the mo.md() string formatted, there we edge cases such as lack of auto-completion of the python code when parameterizing the markdown editor. We can maybe revisit this to add support for this, but for now this needs to happen in Python.

How about an option to override this in the GUI on a per-cell basis. If I have a cell with a lot of markdown and just need the odd bit of python code in it like the example above to call mo.image() then I'd be happy in this case to miss out python auto-completion in this cell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant