Socket
Socket
Sign inDemoInstall

remark-images

Package Overview
Dependencies
Maintainers
3
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark-images - npm Package Compare versions

Comparing version 4.0.0 to 4.1.0

index.d.ts.map

3

index.d.ts

@@ -1,2 +0,3 @@

export type Options = import('./lib/index.js').Options;
export type Options = import("./lib/index.js").Options;
export { default, defaultImageExtensions } from "./lib/index.js";
//# sourceMappingURL=index.d.ts.map

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

export const defaultImageExtensions: ReadonlyArray<string>;
export type Image = import('mdast').Image;
export type Link = import('mdast').Link;
export type Root = import('mdast').Root;
export type RootContent = import('mdast').RootContent;
/**

@@ -30,2 +26,8 @@ * Configuration (optional).

imageExtensions?: ReadonlyArray<string> | null | undefined;
/**
* Whether to wrap the image with a link to it (default: `true`).
*/
link?: boolean | null | undefined;
};
import type { Root } from 'mdast';
//# sourceMappingURL=index.d.ts.map
/**
* @typedef {import('mdast').Image} Image
* @typedef {import('mdast').Link} Link
* @typedef {import('mdast').Root} Root
* @typedef {import('mdast').RootContent} RootContent
* @import {Image, Link, RootContent, Root} from 'mdast'
*/

@@ -14,2 +11,4 @@

* `defaultImageExtensions`).
* @property {boolean | null | undefined} [link]
* Whether to wrap the image with a link to it (default: `true`).
*/

@@ -37,2 +36,3 @@

const imageExtensionRegex = new RegExp(`\\.(${imageExtensions.join('|')})$`)
const link = settings.link !== false

@@ -87,3 +87,3 @@ /**

// Add a link if we’re not already in one.
if (!interactive) {
if (link && !interactive) {
replacement = {

@@ -90,0 +90,0 @@ type: 'link',

{
"name": "remark-images",
"version": "4.0.0",
"version": "4.1.0",
"description": "remark plugin to add a simpler image syntax",

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

"lib/",
"index.d.ts.map",
"index.d.ts",

@@ -52,11 +53,11 @@ "index.js"

"@types/is-url": "^1.0.0",
"@types/node": "^20.0.0",
"c8": "^8.0.0",
"@types/node": "^22.0.0",
"c8": "^10.0.0",
"prettier": "^3.0.0",
"remark": "^15.0.0",
"remark-cli": "^11.0.0",
"remark-preset-wooorm": "^9.0.0",
"remark-cli": "^12.0.0",
"remark-preset-wooorm": "^10.0.0",
"type-coverage": "^2.0.0",
"typescript": "^5.0.0",
"xo": "^0.56.0"
"xo": "^0.59.0"
},

@@ -63,0 +64,0 @@ "scripts": {

@@ -15,18 +15,18 @@ # remark-images

* [What is this?](#what-is-this)
* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`defaultImageExtensions`](#defaultimageextensions)
* [`unified().use(remarkImages[, options])`](#unifieduseremarkimages-options)
* [`Options`](#options)
* [Syntax](#syntax)
* [Syntax tree](#syntax-tree)
* [Types](#types)
* [Compatibility](#compatibility)
* [Security](#security)
* [Related](#related)
* [Contribute](#contribute)
* [License](#license)
* [What is this?](#what-is-this)
* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`defaultImageExtensions`](#defaultimageextensions)
* [`unified().use(remarkImages[, options])`](#unifieduseremarkimages-options)
* [`Options`](#options)
* [Syntax](#syntax)
* [Syntax tree](#syntax-tree)
* [Types](#types)
* [Compatibility](#compatibility)
* [Security](#security)
* [Related](#related)
* [Contribute](#contribute)
* [License](#license)

@@ -121,4 +121,4 @@ ## What is this?

* `options` ([`Options`][api-options], optional)
— configuration
* `options` ([`Options`][api-options], optional)
— configuration

@@ -135,5 +135,7 @@ ###### Returns

* `imageExtensions` (`Array<string>`, default:
[`defaultImageExtensions`][api-default-image-extensions])
— file extensions (without dot) to treat as images
* `imageExtensions` (`Array<string>`, default:
[`defaultImageExtensions`][api-default-image-extensions])
— file extensions (without dot) to treat as images
* `link` (`boolean`, default: `true`)
— whether to wrap the image with a link to it

@@ -149,6 +151,6 @@ ## Syntax

* `https://example.com/image.jpg`
* `/image.jpg`
* `./image.jpg`
* `../image.jpg`
* `https://example.com/image.jpg`
* `/image.jpg`
* `./image.jpg`
* `../image.jpg`

@@ -192,6 +194,6 @@ ## Syntax tree

* [`remark-unwrap-images`][remark-unwrap-images]
— remove the wrapping paragraph for images
* [`remark-embed-images`](https://github.com/remarkjs/remark-embed-images)
— embed local images as data URIs
* [`remark-unwrap-images`][remark-unwrap-images]
— remove the wrapping paragraph for images
* [`remark-embed-images`](https://github.com/remarkjs/remark-embed-images)
— embed local images as data URIs

@@ -198,0 +200,0 @@ ## Contribute

Sorry, the diff of this file is not supported yet

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