Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

micromark

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

micromark - npm Package Compare versions

Comparing version 3.0.5 to 3.0.6

2

dev/lib/compile.js

@@ -40,3 +40,3 @@ /**

import assert from 'assert'
import assert from 'power-assert'
import {decodeEntity} from 'parse-entities/decode-entity.js'

@@ -43,0 +43,0 @@ import {combineHtmlExtensions} from 'micromark-util-combine-extensions'

@@ -27,3 +27,3 @@ /**

import assert from 'assert'
import assert from 'power-assert'
import createDebug from 'debug'

@@ -30,0 +30,0 @@ import {markdownLineEnding} from 'micromark-util-character'

@@ -8,3 +8,3 @@ /**

import assert from 'assert'
import assert from 'power-assert'
import {factorySpace} from 'micromark-factory-space'

@@ -11,0 +11,0 @@ import {markdownLineEnding} from 'micromark-util-character'

@@ -17,3 +17,3 @@ /**

import assert from 'assert'
import assert from 'power-assert'
import {factorySpace} from 'micromark-factory-space'

@@ -20,0 +20,0 @@ import {markdownLineEnding} from 'micromark-util-character'

@@ -7,3 +7,3 @@ /**

import assert from 'assert'
import assert from 'power-assert'
import {blankLine, content} from 'micromark-core-commonmark'

@@ -10,0 +10,0 @@ import {factorySpace} from 'micromark-factory-space'

{
"name": "micromark",
"version": "3.0.5",
"version": "3.0.6",
"description": "small commonmark compliant markdown parser with positional info and concrete tokens",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -19,4 +19,4 @@ <h1 align="center">

* [x] **[compliant][commonmark]** (100% to CommonMark)
* [x] **[extensions][]** ([GFM][], [directives][], [footnotes][],
[frontmatter][], [math][], [MDX.js][mdxjs])
* [x] **[extensions][]** ([GFM][], [directives][], [frontmatter][], [math][],
[MDX.js][mdxjs])
* [x] **[safe][security]** (by default)

@@ -73,3 +73,2 @@ * [x] **[small][size]** (smallest CM parser that exists)

* [Math](#math)
* [Footnotes](#footnotes)
* [Syntax tree](#syntax-tree)

@@ -165,3 +164,3 @@ * [Markdown](#markdown)

The export map supports the endorsed
[`development` condition](https://nodejs.org/api/packages.html#packages_resolving_user_conditions).
[`development` condition](https://nodejs.org/api/packages.html#packages\_resolving\_user\_conditions).
Run `node --conditions development module.js` to get instrumented dev code.

@@ -259,4 +258,2 @@ Without this condition, production code is loaded.

— support directives (generic extensions)
* [`micromark/micromark-extension-footnote`][footnotes]
— support footnotes
* [`micromark/micromark-extension-frontmatter`][frontmatter]

@@ -268,2 +265,4 @@ — support frontmatter (YAML, TOML, etc)

— 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)

@@ -292,2 +291,7 @@ — support GFM strikethrough

#### Community extensions
* [`wataru-chocola/micromark-extension-definition-list`](https://github.com/wataru-chocola/micromark-extension-definition-list)
— support definition lists
### `SyntaxExtension`

@@ -851,3 +855,3 @@

* Add warnings on undefined variables
* Use `micromark-build`, and use `assert`, `debug`, and
* Use `micromark-build`, and use `power-assert`, `debug`, and
`micromark-util-symbol` (see [§ Size & debug][size-debug])

@@ -1096,2 +1100,8 @@ * Add [`mdast-util-from-markdown`][from-markdown] and

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

@@ -1106,2 +1116,6 @@

## Tag filter
<plaintext>
## Tasklist

@@ -1122,3 +1136,3 @@

console.log(micromark(doc, {extensions: [gfm()], htmlExtensions: [gfmHtml]}))
console.log(micromark(doc, {extensions: [gfm()], htmlExtensions: [gfmHtml()]}))
```

@@ -1133,2 +1147,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>

@@ -1147,2 +1163,4 @@ <p><del>one</del> or <del>two</del> tildes.</p>

</table>
<h2>Tag filter</h2>
&lt;plaintext&gt;
<h2>Tasklist</h2>

@@ -1153,2 +1171,9 @@ <ul>

</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>
```

@@ -1193,80 +1218,2 @@

### Footnotes
To support footnotes use [`micromark-extension-footnote`][footnotes].
Say we have a file like this:
```markdown
Here is a footnote call,[^1] and another.[^longnote]
[^1]: Here is the footnote.
[^longnote]: Here’s one with multiple blocks.
Subsequent paragraphs are indented to show that they
belong to the previous footnote.
{ some.code }
The whole paragraph can be indented, or just the first
line. In this way, multi-paragraph footnotes work like
multi-paragraph list items.
This paragraph won’t be part of the note, because it
isn’t indented.
Here is an inline note.^[Inlines notes are easier to write, since
you don’t have to pick an identifier and move down to type the
note.]
```
Then do something like this:
```js
import fs from 'node:fs'
import {micromark} from 'micromark'
import {footnote, footnoteHtml} from 'micromark-extension-footnote'
const doc = fs.readFileSync('example.md')
console.log(
micromark(doc, {extensions: [footnote], htmlExtensions: [footnoteHtml()]})
)
```
<details>
<summary>Show equivalent HTML</summary>
```html
<p>Here is a footnote call,<a href="#fn1" class="footnote-ref" id="fnref1"><sup>1</sup></a> and another.<a href="#fn2" class="footnote-ref" id="fnref2"><sup>2</sup></a></p>
<p>This paragraph won’t be part of the note, because it
isn’t indented.</p>
<p>Here is an inline note.<a href="#fn1" class="footnote-ref" id="fnref1"><sup>1</sup></a></p>
<div class="footnotes">
<hr />
<ol>
<li id="fn1">
<p>Here is the footnote.<a href="#fnref1" class="footnote-back">↩︎</a></p>
</li>
<li id="fn2">
<p>Here’s one with multiple blocks.</p>
<p>Subsequent paragraphs are indented to show that they
belong to the previous footnote.</p>
<pre><code>{ some.code }
</code></pre>
<p>The whole paragraph can be indented, or just the first
line. In this way, multi-paragraph footnotes work like
multi-paragraph list items.<a href="#fnref2" class="footnote-back">↩︎</a></p>
</li>
<li id="fn3">
<p>Inlines notes are easier to write, since
you don’t have to pick an identifier and move down to type the
note.<a href="#fnref3" class="footnote-back">↩︎</a></p>
</li>
</ol>
</div>
```
</details>
### Syntax tree

@@ -1700,4 +1647,2 @@

[footnotes]: https://github.com/micromark/micromark-extension-footnote
[frontmatter]: https://github.com/micromark/micromark-extension-frontmatter

@@ -1704,0 +1649,0 @@

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