A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
Use r-string to ignore escaping (#550)
Pavel Zwerschkeadcd69e69869
diff --git a/docs/apps/output.py b/docs/apps/output.pyindex bfbd2c4d8c..9b0aa4e866 100644--- a/docs/apps/output.py+++ b/docs/apps/output.py@@ -15,7 +15,7 @@ def __(array, ax, dictionary, mo, plots, table, text):tabs = mo.tabs({"markdown": mo.md(- """+ r"""Use `mo.md` to write markdown, with support for LaTeX:\[diff --git a/examples/sine_wave.py b/examples/sine_wave.pyindex 24eb43d9e9..499e1ac79b 100644--- a/examples/sine_wave.py+++ b/examples/sine_wave.py@@ -22,7 +22,7 @@ def __(mo, np):@app.celldef __(amplitude, mo, period):mo.md(- f"""+ rf"""Here's a plot of$f(x) = {amplitude.value:.02f}\sin((2\pi/{period.value:.02f}) x)$:"""diff --git a/marimo/_tutorials/dataflow.py b/marimo/_tutorials/dataflow.pyindex 06bc1cec17..02b3406204 100644--- a/marimo/_tutorials/dataflow.py+++ b/marimo/_tutorials/dataflow.py@@ -131,7 +131,7 @@ def __(matplotlib_installed, mo, np, numpy_installed, plt):plt.ylim(-2, 2)plt.xticks([0, np.pi / 2, np.pi, 3 * np.pi / 2, 2 * np.pi],- [0, "$\pi/2$", "$\pi$", "$3\pi/2$", "$2\pi$"],+ [0, r"$\pi/2$", r"$\pi$", r"$3\pi/2$", r"$2\pi$"],)plt.yticks([-2, -1, 0, 1, 2])plt.gcf().set_size_inches(6.5, 2.4)diff --git a/marimo/_tutorials/markdown.py b/marimo/_tutorials/markdown.pyindex e8bcd5451e..9c45e51c7c 100644--- a/marimo/_tutorials/markdown.py+++ b/marimo/_tutorials/markdown.py@@ -298,7 +298,7 @@ def __(amplitude, mo, period):@app.celldef __(amplitude, mo, period, plotsin):mo.md(- f"""+ rf"""You're viewing the graph of