Skip to content

Conversation

@gordonwoodhull
Copy link

@gordonwoodhull gordonwoodhull commented Feb 2, 2026

This changes quarto-marimo from a filter extension to a Quarto engine extension.

Quarto 1.9.19 will release today or tomorrow with the final claimsLanguage behavior that enables either syntax for Marimo code blocks in Quarto:

  • with space, language with class (preferred Quarto style)
```{python .marimo}
```
  • without space, the language python.marimo
```{python.marimo}
```

With the quarto-marimo extension installed, both are recognized and marimo becomes the execution engine without needing to declare marimo in the metadata.

The PR also contains an atrocious AI-generated-and-tested regex to continue to support

```python {.marimo}
```

That syntax does require engine: marimo in the metadata, where it used to be filter: marimo, so it's not strictly backward-compatible.

If you don't care about that, you can remove all traces of MARIMO_CELL_REGEX:

-          const chunks = await quarto.markdownRegex.breakQuartoMd(
-            target.markdown,
-            false,             // validate
-            false,             // lenient
-            MARIMO_CELL_REGEX  // custom regex for {marimo} and python {.marimo}
-          );
+          const chunks = await quarto.markdownRegex.breakQuartoMd(target.markdown);

Summary of changes

  • Rewrite marimo execution as a Quarto engine extension (TypeScript)
  • Support three cell syntaxes: {python .marimo}, {python.marimo}, python {.marimo}
  • Implement claimsLanguage for automatic engine detection (priority 2 for class syntax)
  • Add cell-execution-regex.ts with comprehensive test suite
  • Fix PDF output handling (mimebundle, raw HTML blocks)
  • Update all examples to use preferred {python .marimo} syntax
  • Requires quarto >= 1.9.19

- Rewrite marimo execution as a Quarto engine extension (TypeScript)
- Support three cell syntaxes: {python .marimo}, {python.marimo}, python {.marimo}
- Implement claimsLanguage for automatic engine detection (priority 2 for class syntax)
- Add cell-execution-regex.ts with comprehensive test suite
- Fix PDF output handling (mimebundle, raw HTML blocks)
- Update all examples to use preferred {python .marimo} syntax
- Requires quarto >= 1.9.19

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

1 participant