Socket
Socket
Sign inDemoInstall

markdown-checklist

Package Overview
Dependencies
0
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    markdown-checklist

Python Markdown extension for task lists with checkboxes


Maintainers
1

Readme

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.

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc