Skip to main content

Markdown Checklist

a Python Markdown extension for lists of tasks with checkboxes

inspired by GitHub task lists:

* [ ] foo
* [x] bar
* [ ] baz

becomes

<ul>
<li><input type="checkbox" disabled> foo</li>
<li><input type="checkbox" disabled checked> bar</li>
<li><input type="checkbox" disabled> baz</li>
</ul>
  • a dash can be used instead of an asterisk for list items
  • both upper- and lowercase "x" are accepted to activate checkboxes

Installation

$ pip install markdown-checklist

Usage

import markdown
html = markdown.markdown(source, extensions=['markdown_checklist.extension'])

or

import markdown
from markdown_checklist.extension import ChecklistExtension
html = markdown.markdown(source, extensions=[ChecklistExtension()])

There is also a small JavaScript/jQuery library to make checkboxes interactive:

new Checklists("article", function(checkbox, callback) {
    var uri = checkbox.closest("article").find("h1 a").attr("href");
    jQuery.get(uri, callback);
}, function(markdown, checkbox, callback) {
    var uri = checkbox.closest("article").find("h1 a").attr("href");
    jQuery.ajax({
        type: "put",
        uri: uri,
        data: markdown,
        success: callback
    });
});

See included checklists.js for details.

Metadata

Release files for markdown-checklist 0.4.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for markdown-checklist 0.4.4
File Size Uploaded
markdown-checklist-0.4.4.tar.gz 7.8 kB Details

Release files / markdown-checklist-0.4.4.tar.gz

Download URL markdown-checklist-0.4.4.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
69c93850798b1e01cdc6fcd4a80592d941f669f6451bbf69c71a4ffd1142f849
BLAKE2b-256 checksum
How to use checksums
d5caed52b8a28ad74abc75592f8c527d151479b547586bba5db2d2c71ef62a0b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release history Release notifications | RSS feed

This release

0.4.4 This release

1 release file

0.4.3

1 release file

0.4.2

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.0

1 release file

0.2.0

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page