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

update: update code block to ```python {.marimo} #3387

Merged
merged 9 commits into from
Jan 31, 2025

Conversation

dmadisetti
Copy link
Collaborator

@dmadisetti dmadisetti commented Jan 9, 2025

fixes #1451

I just pushed this branch up from tinkering around back in September.

Outstanding:

  • tests
    • Basic backwards compat
  • confirm sql blocks
  • code highlight for "python {.marimo} on frontend

Copy link

vercel bot commented Jan 9, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marimo-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 31, 2025 11:36am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
marimo-storybook ⬜️ Ignored (Inspect) Visit Preview Jan 31, 2025 11:36am

@dmadisetti dmadisetti mentioned this pull request Jan 9, 2025
12 tasks
Copy link
Collaborator Author

@dmadisetti dmadisetti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests todo:

  • Update snapshots
  • Read legacy format
  • SQL blocks

marimo/_cli/convert/markdown.py Outdated Show resolved Hide resolved
marimo/_cli/convert/markdown.py Show resolved Hide resolved
marimo/_output/md.py Outdated Show resolved Hide resolved
marimo/_tutorials/markdown_format.md Show resolved Hide resolved
set hide_code=false on export md
@dmadisetti
Copy link
Collaborator Author

I think the issues I had came from the backwards compat stuff I tried to put in. But just bumping the version requirement to the regex change in pymxdown seems to work fine.

SQL stuff also parses and works now (pending CI tests)

@dmadisetti
Copy link
Collaborator Author

Cool! Thanks for those tests, sorry I sat on this for so long. Should also match the block

```python {marimo}
print(hello)
```

Documented in https://github.com/marimo-team/mkdocs-marimo

But the plugin is now probably a little bit out of sync wrt the sql parsing

# SQL notebook

```sql {.marimo query="export"}
SELECT * FROM my_table;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

woah, this is awesome!

Copy link
Contributor

@mscolnick mscolnick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is great! really awesome improvements to this feature

@mscolnick mscolnick merged commit 7a61a27 into main Jan 31, 2025
34 checks passed
@mscolnick mscolnick deleted the dm/md-code-fence-update branch January 31, 2025 16:03
Copy link

🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.10.20-dev2

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

Successfully merging this pull request may close these issues.

Change md code-block style
2 participants