Socket
Socket
Sign inDemoInstall

micromark-extension-gfm

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

micromark-extension-gfm - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0

14

index.d.ts

@@ -12,6 +12,16 @@ /**

): Extension
/** @type {HtmlExtension} */
export const gfmHtml: HtmlExtension
/**
* Support to compile GFM to HTML.
*
* @param {HtmlOptions} [options]
* @returns {HtmlExtension}
*/
export function gfmHtml(
options?:
| import('micromark-extension-gfm-footnote/lib/html').Options
| undefined
): HtmlExtension
export type Extension = import('micromark-util-types').Extension
export type HtmlExtension = import('micromark-util-types').HtmlExtension
export type Options = import('micromark-extension-gfm-strikethrough').Options
export type HtmlOptions = import('micromark-extension-gfm-footnote').HtmlOptions

27

index.js

@@ -5,2 +5,3 @@ /**

* @typedef {import('micromark-extension-gfm-strikethrough').Options} Options
* @typedef {import('micromark-extension-gfm-footnote').HtmlOptions} HtmlOptions
*/

@@ -16,2 +17,3 @@

} from 'micromark-extension-gfm-autolink-literal'
import {gfmFootnote, gfmFootnoteHtml} from 'micromark-extension-gfm-footnote'
import {

@@ -37,2 +39,3 @@ gfmStrikethrough,

gfmAutolinkLiteral,
gfmFootnote(),
gfmStrikethrough(options),

@@ -44,9 +47,17 @@ gfmTable,

/** @type {HtmlExtension} */
export const gfmHtml = combineHtmlExtensions([
gfmAutolinkLiteralHtml,
gfmStrikethroughHtml,
gfmTableHtml,
gfmTagfilterHtml,
gfmTaskListItemHtml
])
/**
* Support to compile GFM to HTML.
*
* @param {HtmlOptions} [options]
* @returns {HtmlExtension}
*/
export function gfmHtml(options) {
return combineHtmlExtensions([
gfmAutolinkLiteralHtml,
gfmFootnoteHtml(options),
gfmStrikethroughHtml,
gfmTableHtml,
gfmTagfilterHtml,
gfmTaskListItemHtml
])
}
{
"name": "micromark-extension-gfm",
"version": "1.0.0",
"version": "2.0.0",
"description": "micromark extension to support GFM (GitHub Flavored Markdown)",

@@ -13,2 +13,3 @@ "license": "MIT",

"autolink",
"footnote",
"tagfilter",

@@ -40,2 +41,3 @@ "github",

"micromark-extension-gfm-autolink-literal": "^1.0.0",
"micromark-extension-gfm-footnote": "^1.0.0",
"micromark-extension-gfm-strikethrough": "^1.0.0",

@@ -49,4 +51,3 @@ "micromark-extension-gfm-table": "^1.0.0",

"devDependencies": {
"@types/hast": "^2.3.1",
"@types/node-fetch": "^2.5.10",
"@types/node-fetch": "^3.0.0",
"@types/tape": "^4.0.0",

@@ -57,7 +58,7 @@ "c8": "^7.0.0",

"micromark": "^3.0.0",
"node-fetch": "^2.0.0",
"node-fetch": "^3.0.0",
"prettier": "^2.0.0",
"rehype-parse": "^7.0.0",
"remark-cli": "^9.0.0",
"remark-preset-wooorm": "^8.0.0",
"rehype-parse": "^8.0.0",
"remark-cli": "^10.0.0",
"remark-preset-wooorm": "^9.0.0",
"rimraf": "^3.0.0",

@@ -67,4 +68,4 @@ "tape": "^5.0.0",

"typescript": "^4.0.0",
"unified": "^9.0.0",
"xo": "^0.39.0"
"unified": "^10.0.0",
"xo": "^0.45.0"
},

@@ -71,0 +72,0 @@ "scripts": {

@@ -27,2 +27,4 @@ # micromark-extension-gfm

— support GFM [autolink literals][]
* [`micromark/micromark-extension-gfm-footnote`](https://github.com/micromark/micromark-extension-gfm-footnote)
— support GFM footnotes
* [`micromark/micromark-extension-gfm-strikethrough`](https://github.com/micromark/micromark-extension-gfm-strikethrough)

@@ -59,2 +61,8 @@ — support GFM [strikethrough][]

## Footnote
A note[^1]
[^1]: Big note.
## Strikethrough

@@ -89,3 +97,3 @@

extensions: [gfm()],
htmlExtensions: [gfmHtml]
htmlExtensions: [gfmHtml()]
})

@@ -102,2 +110,4 @@

<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>
<h2>Footnote</h2>
<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>
<h2>Strikethrough</h2>

@@ -123,2 +133,9 @@ <p><del>one</del> or <del>two</del> tildes.</p>

</ul>
<section data-footnotes="" class="footnotes"><h2 id="footnote-label" class="sr-only">Footnotes</h2>
<ol>
<li id="user-content-fn-1">
<p>Big note. <a href="#user-content-fnref-1" data-footnote-backref="" class="data-footnote-backref" aria-label="Back to content">↩</a></p>
</li>
</ol>
</section>
```

@@ -138,4 +155,4 @@

micromark to parse GFM (can be passed in `extensions`).
`gfmHtml` is an extension for micromark to compile as elements (can be passed in
`htmlExtensions`).
`gfmHtml` is a function that can be called and returns an extension for
micromark to compile as elements (can be passed in `htmlExtensions`).

@@ -163,2 +180,4 @@ ##### `options`

— support GFM [autolink literals][]
* [`micromark/micromark-extension-gfm-footnote`](https://github.com/micromark/micromark-extension-gfm-footnote)
— support GFM footnotes
* [`micromark/micromark-extension-gfm-strikethrough`](https://github.com/micromark/micromark-extension-gfm-strikethrough)

@@ -165,0 +184,0 @@ — support GFM [strikethrough][]

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc