Gathering detailed insights and metrics for micromark-extension-gfm-task-list-item
Gathering detailed insights and metrics for micromark-extension-gfm-task-list-item
micromark extension to support GFM task list items
npm install micromark-extension-gfm-task-list-item
Typescript
Module System
Node Version
NPM Version
99
Supply Chain
99.5
Quality
76.7
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
306,671,962
Last Day
292,445
Last Week
1,818,510
Last Month
14,787,107
Last Year
166,646,697
7 Stars
83 Commits
1 Forks
7 Watching
1 Branches
12 Contributors
Minified
Minified + Gzipped
Latest Version
2.1.0
Package Id
micromark-extension-gfm-task-list-item@2.1.0
Unpacked Size
23.84 kB
Size
6.44 kB
File Count
15
NPM Version
10.8.1
Node Version
22.0.0
Publised On
05 Jul 2024
Cumulative downloads
Total Downloads
Last day
-11.9%
292,445
Compared to previous day
Last week
-44.3%
1,818,510
Compared to previous week
Last month
-5.6%
14,787,107
Compared to previous month
Last year
92.6%
166,646,697
Compared to previous year
micromark extensions to support GFM task list items.
This package contains extensions that add support for task lists as enabled by
GFM to micromark
.
It matches how task list items work on github.com
.
This project is useful when you want to support task lists in markdown.
You can use these extensions when you are working with micromark
.
To support all GFM features, use
micromark-extension-gfm
.
When you need a syntax tree, you can combine this package with
mdast-util-gfm-task-list-item
.
All these packages are used remark-gfm
, which focusses on making
it easier to transform content by abstracting these internals away.
This package is ESM only. In Node.js (version 16+), install with npm:
1npm install micromark-extension-gfm-task-list-item
In Deno with esm.sh
:
1import {gfmTaskListItem, gfmTaskListItemHtml} from 'https://esm.sh/micromark-extension-gfm-task-list-item@2'
In browsers with esm.sh
:
1<script type="module"> 2 import {gfmTaskListItem, gfmTaskListItemHtml} from 'https://esm.sh/micromark-extension-gfm-task-list-item@2?bundle' 3</script>
1import {micromark} from 'micromark' 2import { 3 gfmTaskListItem, 4 gfmTaskListItemHtml 5} from 'micromark-extension-gfm-task-list-item' 6 7const output = micromark('* [x] a\n* [ ] b', { 8 extensions: [gfmTaskListItem()], 9 htmlExtensions: [gfmTaskListItemHtml()] 10}) 11 12console.log(output)
Yields:
1<ul> 2<li><input type="checkbox" disabled="" checked="" /> a</li> 3<li><input type="checkbox" disabled="" /> b</li> 4</ul>
This package exports the identifiers gfmTaskListItem
and gfmTaskListItemHtml
.
There is no default export.
The export map supports the development
condition.
Run node --conditions development module.js
to get instrumented dev code.
Without this condition, production code is loaded.
gfmTaskListItem()
Create an HTML extension for micromark
to support GFM task list items
syntax.
Extension for micromark
that can be passed in extensions
, to enable GFM
task list items syntax (Extension
).
gfmTaskListItemHtml()
Create an HTML extension for micromark
to support GFM task list items when
serializing to HTML.
Extension for micromark
that can be passed in htmlExtensions
to support GFM
task list items when serializing to HTML
(HtmlExtension
).
It is recommended to use lowercase x
(instead of uppercase X
), because in
markdown, it is more common to use lowercase in places where casing does not
matter.
It is also recommended to use a space (instead of a tab), as there is no benefit
of using tabs in this case.
Checks relate to the <input>
element, in the checkbox state (type=checkbox
),
in HTML.
See § 4.10.5.1.15 Checkbox state (type=checkbox
)
in the HTML spec for more info.
1<!--…--> 2<li><input type="checkbox" disabled="" /> foo</li> 3<li><input type="checkbox" disabled="" checked="" /> bar</li> 4<!--…-->
GitHub itself uses slightly different markup for task list items than they define in their spec. When following the spec, as this extension does, only inputs are added. They can be styled with the following CSS:
1input[type="checkbox"] { 2 margin: 0 .2em .25em -1.6em; 3 vertical-align: middle; 4} 5 6input[type="checkbox"]:dir(rtl) { 7 margin: 0 -1.6em .25em .2em; 8}
For the complete actual CSS see
sindresorhus/github-markdown-css
.
Checks form with the following BNF:
1gfm_task_list_item_check ::= '[' (0x09 | ' ' | 'X' | 'x') ']'
The check is only allowed at the start of the first paragraph, optionally
following zero or more definitions or a blank line, in a list item.
The check must be followed by whitespace ([\t\n\r ]*
), which is in turn
followed by non-whitespace.
This package is fully typed with TypeScript. It exports no additional types.
Projects maintained by the unified collective are compatible with maintained versions of Node.js.
When we cut a new major release, we drop support for unmaintained versions of
Node.
This means we try to keep the current release line,
micromark-extension-gfm-task-list-item@^2
, compatible with Node.js 16.
This package works with micromark
version 3
and later.
This package is safe.
micromark-extension-gfm
— support all of GFMmdast-util-gfm-task-list-item
— support all of GFM in mdastmdast-util-gfm
— support all of GFM in mdastremark-gfm
— support all of GFM in remarkSee contributing.md
in micromark/.github
for ways to get
started.
See support.md
for ways to get help.
This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 1/30 approved changesets -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-01-06
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More