Skip to content

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.

feat: add task list support to markdown (#3151)

Myles Scolnick8defa6d5a4f6
diff --git a/frontend/src/css/md.css b/frontend/src/css/md.css
index cd89960515..55679a84ba 100644
--- a/frontend/src/css/md.css
+++ b/frontend/src/css/md.css
@@ -96,3 +96,16 @@ This change includes accordions https://github.com/marimo-team/marimo/issues/221
button .prose.prose {
max-width: none;
}
+
+/* Task list */
+
+.prose .task-list-item {
+ list-style-type: none !important;
+ margin-top: 0.25rem;
+ margin-bottom: 0.25rem;
+}
+
+.prose .task-list-item input[type="checkbox"] {
+ margin: 0 0.5rem 0.25rem -1.6rem;
+ vertical-align: middle;
+}
diff --git a/marimo/_output/md.py b/marimo/_output/md.py
index 79b5b3c129..4142c172a4 100644
--- a/marimo/_output/md.py
+++ b/marimo/_output/md.py
@@ -63,6 +63,8 @@ class _md(Html):
"pymdownx.tilde",
# Better code blocks
"pymdownx.superfences",
+ # Task lists
+ "pymdownx.tasklist",
# Table of contents
# This adds ids to the HTML headers
"toc",
diff --git a/marimo/_smoke_tests/markdown_pymdownx.py b/marimo/_smoke_tests/markdown_pymdownx.py
new file mode 100644
index 0000000000..9068a6c7ab
--- /dev/null
+++ b/marimo/_smoke_tests/markdown_pymdownx.py
@@ -0,0 +1,37 @@
+import marimo
+
+__generated_with = "0.9.34"
+app = marimo.App(width="medium")
+
+
+def _(mo):
+ mo.md(
+ r"""
+ Task List
+
+ - item
+ - [X] item 1
+ * [X] item A
+ * [ ] item B
+ more text
+ + [x] item a
+ + [ ] item b
+ + [x] item c
+ * [X] item C
+ * non item
+ - [ ] item 2
+ - [ ] item 3
+ """
+ )
+ return
+
+
+def _():
+ import marimo as mo
+ return (mo,)
+
+
+if __name__ == "__main__":
+ app.run()