Socket
Socket
Sign inDemoInstall

micromark-extension-mdx-md

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

micromark-extension-mdx-md - npm Package Compare versions

Comparing version 1.0.1 to 2.0.0

13

index.d.ts
/**
* @type {import('micromark-util-types').Extension}
* @typedef {import('micromark-util-types').Extension} Extension
*/
export const mdxMd: import('micromark-util-types').Extension
/**
* Create an extension for `micromark` to disable some CommonMark syntax (code
* (indented), autolinks, and HTML (flow and text)) for MDX.
*
* @returns {Extension}
* Extension for `micromark` that can be passed in `extensions` to disable
* some CommonMark syntax for MDX.
*/
export function mdxMd(): Extension
export type Extension = import('micromark-util-types').Extension

17

index.js

@@ -5,13 +5,14 @@ /**

// To do: next major: expose functions.
/**
* Extension for `micromark` that can be passed in `extensions` to disable
* some CommonMark syntax (code (indented), autolinks, and HTML (flow and
* text)) for MDX.
* Create an extension for `micromark` to disable some CommonMark syntax (code
* (indented), autolinks, and HTML (flow and text)) for MDX.
*
* @type {Extension}
* @returns {Extension}
* Extension for `micromark` that can be passed in `extensions` to disable
* some CommonMark syntax for MDX.
*/
export const mdxMd = {
disable: {null: ['autolink', 'codeIndented', 'htmlFlow', 'htmlText']}
export function mdxMd() {
return {
disable: {null: ['autolink', 'codeIndented', 'htmlFlow', 'htmlText']}
}
}
{
"name": "micromark-extension-mdx-md",
"version": "1.0.1",
"version": "2.0.0",
"description": "micromark extension to turn some markdown features off for MDX",

@@ -27,4 +27,3 @@ "license": "MIT",

"type": "module",
"main": "index.js",
"types": "index.d.ts",
"exports": "./index.js",
"files": [

@@ -35,8 +34,8 @@ "index.d.ts",

"dependencies": {
"micromark-util-types": "^1.0.0"
"micromark-util-types": "^2.0.0"
},
"devDependencies": {
"@types/node": "^20.0.0",
"c8": "^7.0.0",
"micromark": "^3.0.0",
"c8": "^8.0.0",
"micromark": "^4.0.0",
"prettier": "^2.0.0",

@@ -60,19 +59,12 @@ "remark-cli": "^11.0.0",

"prettier": {
"tabWidth": 2,
"useTabs": false,
"singleQuote": true,
"bracketSpacing": false,
"semi": false,
"trailingComma": "none"
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "none",
"useTabs": false
},
"xo": {
"prettier": true
},
"remarkConfig": {
"plugins": [
"remark-preset-wooorm",
[
"remark-lint-maximum-heading-length",
false
]
"remark-preset-wooorm"
]

@@ -83,5 +75,8 @@ },

"detail": true,
"strict": true,
"ignoreCatch": true
"ignoreCatch": true,
"strict": true
},
"xo": {
"prettier": true
}
}

@@ -20,3 +20,3 @@ # micromark-extension-mdx-md

* [API](#api)
* [`mdxMd`](#mdxmd)
* [`mdxMd()`](#mdxmd)
* [Authoring](#authoring)

@@ -59,3 +59,3 @@ * [Types](#types)

```js
import {mdxMd} from 'https://esm.sh/micromark-extension-mdx-md@1'
import {mdxMd} from 'https://esm.sh/micromark-extension-mdx-md@2'
```

@@ -67,3 +67,3 @@

<script type="module">
import {mdxMd} from 'https://esm.sh/micromark-extension-mdx-md@1?bundle'
import {mdxMd} from 'https://esm.sh/micromark-extension-mdx-md@2?bundle'
</script>

@@ -78,3 +78,3 @@ ```

const output = micromark('\ta', {extensions: [mdxMd]})
const output = micromark('\ta', {extensions: [mdxMd()]})

@@ -95,12 +95,16 @@ console.log(output)

### `mdxMd`
### `mdxMd()`
Create an extension for `micromark` to disable some CommonMark syntax (code
(indented), autolinks, and HTML (flow and text)) for MDX.
###### Returns
Extension for `micromark` that can be passed in `extensions` to disable some
CommonMark syntax (code (indented), autolinks, and HTML (flow and text)) for
MDX ([`Extension`][micromark-extension]).
CommonMark syntax for MDX ([`Extension`][micromark-extension]).
## Authoring
To improve authoring the new constructs MDX adds (JSX, expressions, and
ESM), some markdown features are turned off by this extension.
To improve authoring the new constructs MDX adds (ESM, expressions, and
JSX), some markdown features are turned off by this extension.
There are good alternatives.

@@ -154,8 +158,10 @@

Projects maintained by the unified collective are compatible with all maintained
Projects maintained by the unified collective are compatible with maintained
versions of Node.js.
As of now, that is Node.js 16+.
Our projects sometimes work with older versions, but this is not guaranteed.
These extensions work with `micromark` version 3+.
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-mdx-md@^2`,
compatible with Node.js 16.
This package works with `micromark@^3`.

@@ -201,5 +207,5 @@ ## Security

[size-badge]: https://img.shields.io/bundlephobia/minzip/micromark-extension-mdx-md.svg
[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=micromark-extension-mdx-md
[size]: https://bundlephobia.com/result?p=micromark-extension-mdx-md
[size]: https://bundlejs.com/?q=micromark-extension-mdx-md

@@ -206,0 +212,0 @@ [sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg

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