Comparing version 7.0.4 to 7.0.5
@@ -306,2 +306,3 @@ declare module "Tokens" { | ||
export type ResultCallback = (error: Error | null, parseResult?: string) => undefined | void; | ||
export type MaybePromise = void | Promise<void>; | ||
export class Marked { | ||
@@ -326,3 +327,3 @@ #private; | ||
*/ | ||
walkTokens<T = void>(tokens: Token[] | TokensList, callback: (token: Token) => T | T[]): T[]; | ||
walkTokens(tokens: Token[] | TokensList, callback: (token: Token) => MaybePromise | MaybePromise[]): MaybePromise[]; | ||
use(...args: MarkedExtension[]): this; | ||
@@ -572,3 +573,3 @@ setOptions(opt: MarkedOptions): this; | ||
*/ | ||
walkTokens?: ((token: Token) => void | unknown | Promise<void>) | undefined | null; | ||
walkTokens?: ((token: Token) => void | Promise<void>) | undefined | null; | ||
/** | ||
@@ -609,3 +610,3 @@ * Generate closing slash for self-closing tags (<br/> instead of <br>) | ||
*/ | ||
walkTokens?: null | ((token: Token) => void | (unknown | Promise<void>)[]); | ||
walkTokens?: null | ((token: Token) => void | Promise<void> | (void | Promise<void>)[]); | ||
} | ||
@@ -649,3 +650,3 @@ } | ||
import type { Token, TokensList } from "Tokens"; | ||
import type { ResultCallback } from "Instance"; | ||
import type { ResultCallback, MaybePromise } from "Instance"; | ||
/** | ||
@@ -697,3 +698,3 @@ * Compiles markdown to HTML asynchronously. | ||
var use: (...args: MarkedExtension[]) => typeof marked; | ||
var walkTokens: <T = void>(tokens: Token[] | TokensList, callback: (token: Token) => T | T[]) => T[]; | ||
var walkTokens: (tokens: Token[] | TokensList, callback: (token: Token) => MaybePromise | MaybePromise[]) => MaybePromise[]; | ||
var parseInline: (src: string, optOrCallback?: MarkedOptions | ResultCallback | null | undefined, callback?: ResultCallback | undefined) => string | Promise<string | undefined> | undefined; | ||
@@ -714,3 +715,3 @@ var Parser: typeof _Parser; | ||
export const use: (...args: MarkedExtension[]) => typeof marked; | ||
export const walkTokens: <T = void>(tokens: Token[] | TokensList, callback: (token: Token) => T | T[]) => T[]; | ||
export const walkTokens: (tokens: Token[] | TokensList, callback: (token: Token) => MaybePromise | MaybePromise[]) => MaybePromise[]; | ||
export const parseInline: (src: string, optOrCallback?: MarkedOptions | ResultCallback | null | undefined, callback?: ResultCallback | undefined) => string | Promise<string | undefined> | undefined; | ||
@@ -717,0 +718,0 @@ export const parse: typeof marked; |
/** | ||
* marked v7.0.4 - a markdown parser | ||
* marked v7.0.5 - a markdown parser | ||
* Copyright (c) 2011-2023, Christopher Jeffrey. (MIT Licensed) | ||
@@ -4,0 +4,0 @@ * https://github.com/markedjs/marked |
@@ -5,3 +5,3 @@ { | ||
"author": "Christopher Jeffrey", | ||
"version": "7.0.4", | ||
"version": "7.0.5", | ||
"type": "module", | ||
@@ -53,6 +53,6 @@ "main": "./lib/marked.cjs", | ||
"@semantic-release/github": "^9.0.4", | ||
"@semantic-release/npm": "^10.0.4", | ||
"@semantic-release/npm": "^10.0.5", | ||
"@semantic-release/release-notes-generator": "^11.0.4", | ||
"@typescript-eslint/eslint-plugin": "^6.3.0", | ||
"@typescript-eslint/parser": "^6.3.0", | ||
"@typescript-eslint/eslint-plugin": "^6.4.1", | ||
"@typescript-eslint/parser": "^6.4.1", | ||
"cheerio": "^1.0.0-rc.12", | ||
@@ -63,3 +63,3 @@ "commonmark": "0.30.0", | ||
"eslint-config-standard": "^17.1.0", | ||
"eslint-plugin-import": "^2.28.0", | ||
"eslint-plugin-import": "^2.28.1", | ||
"eslint-plugin-n": "^16.0.1", | ||
@@ -75,3 +75,3 @@ "eslint-plugin-promise": "^6.1.1", | ||
"rollup": "^3.28.0", | ||
"semantic-release": "^21.0.7", | ||
"semantic-release": "^21.0.9", | ||
"titleize": "^3.0.0", | ||
@@ -78,0 +78,0 @@ "ts-expect": "^1.3.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1006700
9030