Installations
npm install micromark-extension-gfm-bn
Developer Guide
Typescript
Yes
Module System
ESM
Node Version
18.17.0
NPM Version
9.6.7
Releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
Download Statistics
Total Downloads
283
Last Day
3
Last Week
5
Last Month
13
Last Year
140
GitHub Statistics
31 Stars
75 Commits
2 Forks
7 Watching
1 Branches
12 Contributors
Bundle Size
20.71 kB
Minified
6.69 kB
Minified + Gzipped
Sponsor this package
Package Meta Information
Latest Version
2.0.0
Package Id
micromark-extension-gfm-bn@2.0.0
Unpacked Size
13.49 kB
Size
4.36 kB
File Count
4
NPM Version
9.6.7
Node Version
18.17.0
Publised On
28 Dec 2023
Total Downloads
Cumulative downloads
Total Downloads
283
Last day
0%
3
Compared to previous day
Last week
25%
5
Compared to previous week
Last month
160%
13
Compared to previous month
Last year
-2.1%
140
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
8
micromark-extension-gfm
micromark extension to support GitHub flavored markdown. This extension matches either the GFM spec or github.com (default).
This package provides the low-level modules for integrating with the micromark tokenizer and the micromark HTML compiler.
When to use this
If you’re using micromark
or
mdast-util-from-markdown
, use this package.
Alternatively, if you’re using remark, use remark-gfm
.
If you don’t need all of GFM, the extensions can be used separately:
micromark/micromark-extension-gfm-autolink-literal
— support GFM autolink literalsmicromark/micromark-extension-gfm-footnote
— support GFM footnotesmicromark/micromark-extension-gfm-strikethrough
— support GFM strikethroughmicromark/micromark-extension-gfm-table
— support GFM tablesmicromark/micromark-extension-gfm-tagfilter
— support GFM tagfiltermicromark/micromark-extension-gfm-task-list-item
— support GFM tasklists
Install
This package is ESM only:
Node 12+ is needed to use it and it must be import
ed instead of require
d.
npm:
1npm install micromark-extension-gfm
Use
Say we have the following file, example.md
:
1# GFM 2 3## Autolink literals 4 5www.example.com, https://example.com, and contact@example.com. 6 7## Footnote 8 9A note[^1] 10 11[^1]: Big note. 12 13## Strikethrough 14 15~one~ or ~~two~~ tildes. 16 17## Table 18 19| a | b | c | d | 20| - | :- | -: | :-: | 21 22## Tag filter 23 24<plaintext> 25 26## Tasklist 27 28* [ ] to do 29* [x] done
And our module, example.js
, looks as follows:
1import fs from 'node:fs' 2import {micromark} from 'micromark' 3import {gfm, gfmHtml} from 'micromark-extension-gfm' 4 5const output = micromark(fs.readFileSync('example.md'), { 6 allowDangerousHtml: true, 7 extensions: [gfm()], 8 htmlExtensions: [gfmHtml()] 9}) 10 11console.log(output)
Now, running node example
yields:
1<h1>GFM</h1> 2<h2>Autolink literals</h2> 3<p><a href="http://www.example.com">www.example.com</a>, <a href="https://example.com">https://example.com</a>, and <a href="mailto:contact@example.com">contact@example.com</a>.</p> 4<h2>Footnote</h2> 5<p>A note<sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref="" aria-describedby="footnote-label">1</a></sup></p> 6<h2>Strikethrough</h2> 7<p><del>one</del> or <del>two</del> tildes.</p> 8<h2>Table</h2> 9<table> 10<thead> 11<tr> 12<th>a</th> 13<th align="left">b</th> 14<th align="right">c</th> 15<th align="center">d</th> 16</tr> 17</thead> 18</table> 19<h2>Tag filter</h2> 20<plaintext> 21<h2>Tasklist</h2> 22<ul> 23<li><input disabled="" type="checkbox"> to do</li> 24<li><input checked="" disabled="" type="checkbox"> done</li> 25</ul> 26<section data-footnotes="" class="footnotes"><h2 id="footnote-label" class="sr-only">Footnotes</h2> 27<ol> 28<li id="user-content-fn-1"> 29<p>Big note. <a href="#user-content-fnref-1" data-footnote-backref="" class="data-footnote-backref" aria-label="Back to content">↩</a></p> 30</li> 31</ol> 32</section>
API
This package exports the following identifiers: gfm
, gfmHtml
.
There is no default export.
gfm(options?)
gfmHtml
Support GFM or markdown on github.com.
gfm
is a function that can be called with options and returns an extension for
micromark to parse GFM (can be passed in extensions
).
gfmHtml
is a function that can be called and returns an extension for
micromark to compile as elements (can be passed in htmlExtensions
).
options
options.singleTilde
Passed as singleTilde
in
micromark-extension-gfm-strikethrough
.
Related
remarkjs/remark
— markdown processor powered by pluginssyntax-tree/mdast-util-gfm
— mdast utility to support GFMsyntax-tree/mdast-util-from-markdown
— mdast parser usingmicromark
to create mdast from markdownsyntax-tree/mdast-util-to-markdown
— mdast serializer to create markdown from mdastmicromark/micromark
— the smallest commonmark-compliant markdown parser that existsmicromark/micromark-extension-gfm-autolink-literal
— support GFM autolink literalsmicromark/micromark-extension-gfm-footnote
— support GFM footnotesmicromark/micromark-extension-gfm-strikethrough
— support GFM strikethroughmicromark/micromark-extension-gfm-table
— support GFM tablesmicromark/micromark-extension-gfm-tagfilter
— support GFM tagfiltermicromark/micromark-extension-gfm-task-list-item
— support GFM tasklists
Contribute
See 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.
License
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: license:0
- Info: FSF or OSI recognized license: MIT License: license:0
Reason
security policy file detected
Details
- Info: security policy file detected: github.com/micromark/.github/security.md:1
- Info: Found linked content: github.com/micromark/.github/security.md:1
- Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/micromark/.github/security.md:1
- Info: Found text in security policy: github.com/micromark/.github/security.md:1
Reason
Found 1/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/bb.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/micromark/micromark-extension-gfm/bb.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/micromark/micromark-extension-gfm/main.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/micromark/micromark-extension-gfm/main.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/micromark/micromark-extension-gfm/main.yml/main?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/main.yml:15
- Info: 0 out of 2 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 2 third-party GitHubAction dependencies pinned
- Info: 0 out of 1 npmCommand dependencies pinned
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/bb.yml:1
- Warn: no topLevel permission defined: .github/workflows/main.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'main'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 1 are checked with a SAST tool
Score
4.1
/10
Last Scanned on 2025-01-27
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