File tree Expand file tree Collapse file tree 3 files changed +15
-13
lines changed
Expand file tree Collapse file tree 3 files changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -406,7 +406,7 @@ function delay(ms, options = {}) {
406406
407407// src/marimo-engine.ts
408408var quarto ;
409- var MARIMO_CELL_REGEX = / ^ \s * ( ` ` ` + ) \s * (?: p y t h o n \s + \{ \. | \{ \. p y t h o n \. | \{ ) ( m a r i m o ) ( * [ , ] .* ) ? \} \s * $ / ;
409+ var MARIMO_CELL_REGEX = / ^ \s * ( ` ` ` + ) \s * \{ ? ( p y t h o n ) (?: \s + \{ \. | \. ) m a r i m o ( * [ , ] .* ) ? \} \s * $ / ;
410410async function executePython ( command , args = [ ] , stdin = "" ) {
411411 const cmd = new Deno . Command ( command , {
412412 args,
@@ -532,7 +532,7 @@ var marimoEngineDiscovery = {
532532 return false ;
533533 } ,
534534 claimsLanguage : ( language ) => {
535- return language === "marimo " ;
535+ return language === "python " ;
536536 } ,
537537 canFreeze : false ,
538538 generatesFigures : true ,
@@ -603,6 +603,7 @@ var marimoEngineDiscovery = {
603603 const processedCells = [ ] ;
604604 let marimoIndex = 0 ;
605605 for ( const cell of chunks . cells ) {
606+ console . log ( "is marimo" , cell , isMarimoCell ( cell ) ) ;
606607 if ( isMarimoCell ( cell ) ) {
607608 if ( marimoIndex < marimoExecution . outputs . length ) {
608609 const output = marimoExecution . outputs [ marimoIndex ] ;
Original file line number Diff line number Diff line change @@ -25,11 +25,12 @@ import type {
2525
2626let quarto : QuartoAPI ;
2727
28- // Matches {marimo}, python {.marimo}, and {.python.marimo} syntax
28+ // Matches
29+ // ```python {.marimo}
30+ // ```{python.marimo}
2931// Group 1: backticks (```+)
30- // Group 2: language ("marimo")
31- // Does NOT match {.marimo} alone (requires python prefix for dot syntax)
32- const MARIMO_CELL_REGEX = / ^ \s * ( ` ` ` + ) \s * (?: p y t h o n \s + \{ \. | \{ \. p y t h o n \. | \{ ) ( m a r i m o ) ( * [ , ] .* ) ? \} \s * $ / ;
32+ // Group 2: language ("python")
33+ const MARIMO_CELL_REGEX = / ^ \s * ( ` ` ` + ) \s * \{ ? ( p y t h o n ) (?: \s + \{ \. | \. ) m a r i m o ( * [ , ] .* ) ? \} \s * $ / ;
3334
3435// Type for marimo cell output from extract.py
3536interface MarimoOutput {
@@ -215,7 +216,7 @@ const marimoEngineDiscovery: ExecutionEngineDiscovery = {
215216 } ,
216217
217218 claimsLanguage : ( language : string ) => {
218- return language === "marimo " ;
219+ return language === "python " ;
219220 } ,
220221
221222 canFreeze : false ,
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ extract-media: _site/media
1515
1616# PDF Output
1717
18- ``` {. python.marimo}
18+ ``` {python.marimo}
1919check = """
2020Quarto can handle images and tables in PDF output, but not rich HTML outputs.
2121Here's an example of what can be acccomplished with the `marimo` exports to pdf.
@@ -39,7 +39,7 @@ import matplotlib.pyplot as plt
3939plt.plot([1 , 2 ])
4040```
4141
42- ``` {. python.marimo}
42+ ``` {python.marimo}
4343plt.plot([1, 2])
4444plt.gca()
4545```
@@ -57,7 +57,7 @@ df = pd.DataFrame({
5757df
5858```
5959
60- ``` {. python.marimo}
60+ ``` {python.marimo}
6161df = pd.DataFrame({
6262 'A': [1, 2, 3],
6363 'B': [4, 5, 6]
6767
6868## Text / Markdown
6969
70- ``` {. python.marimo}
70+ ``` {python.marimo}
7171f"""You can also include text or markdown in the PDF output.
7272Which can be useful for embedding computed values like the fact
7373that this was rendered by Marimo {mo.__version__} on {datetime.datetime.now()}.
7474"""
7575```
7676
77- ``` {. python.marimo}
77+ ``` {python.marimo}
7878try:
7979 import matplotlib
8080 import matplotlib.pyplot as plt
@@ -90,6 +90,6 @@ if not missing_packages:
9090```
9191
9292
93- ``` {. python.marimo}
93+ ``` {python.marimo}
9494import marimo as mo
9595```
You can’t perform that action at this time.
0 commit comments