Socket
Socket
Sign inDemoInstall

mdast-util-mdx-jsx

Package Overview
Dependencies
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mdast-util-mdx-jsx - npm Package Compare versions

Comparing version 1.1.2 to 1.1.3

3

index.d.ts

@@ -13,3 +13,4 @@ /** @type {FromMarkdownExtension} */

export type ToMarkdownMap = import('mdast-util-to-markdown').Map
export type OnError = import('mdast-util-from-markdown').OnError
export type OnEnterError = import('mdast-util-from-markdown').OnEnterError
export type OnExitError = import('mdast-util-from-markdown').OnExitError
export type Program = import('estree-jsx').Program

@@ -16,0 +17,0 @@ export type MdxJsxAttributeValueExpression =

@@ -10,3 +10,4 @@ /**

* @typedef {import('mdast-util-to-markdown').Map} ToMarkdownMap
* @typedef {import('mdast-util-from-markdown').OnError} OnError
* @typedef {import('mdast-util-from-markdown').OnEnterError} OnEnterError
* @typedef {import('mdast-util-from-markdown').OnExitError} OnExitError
* @typedef {import('estree-jsx').Program} Program

@@ -316,3 +317,3 @@ * @typedef {import('./complex-types').MdxJsxAttributeValueExpression} MdxJsxAttributeValueExpression

token,
onError
onErrorRightIsTag
)

@@ -322,3 +323,3 @@ }

if (tag.selfClosing || tag.close) {
this.exit(token)
this.exit(token, onErrorLeftIsTag)
} else {

@@ -329,4 +330,4 @@ stack.push(tag)

/** @type {OnError} */
function onError(closing, open) {
/** @type {OnEnterError} */
function onErrorRightIsTag(closing, open) {
const tag = /** @type {Tag} */ (this.getData('mdxJsxTag'))

@@ -350,2 +351,22 @@ const place = closing ? ' before the end of `' + closing.type + '`' : ''

/** @type {OnExitError} */
function onErrorLeftIsTag(a, b) {
const tag = /** @type {Tag} */ (this.getData('mdxJsxTag'))
throw new VFileMessage(
'Expected the closing tag `' +
serializeAbbreviatedTag(tag) +
'` either after the end of `' +
b.type +
'` (' +
stringifyPosition(b.end) +
') or another opening tag after the start of `' +
b.type +
'` (' +
stringifyPosition(b.start) +
')',
{start: a.start, end: a.end},
'mdast-util-mdx-jsx:end-tag-mismatch'
)
}
/**

@@ -352,0 +373,0 @@ * Serialize a tag, excluding attributes.

{
"name": "mdast-util-mdx-jsx",
"version": "1.1.2",
"version": "1.1.3",
"description": "mdast extension to parse and serialize MDX or MDX.js JSX",

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

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