unstale

npm / marked

marked

What changed in marked 1 to 18, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-24.

42 breaking4 security9 deprecations15 new APIs and options12 performance7 behavior and defaults1 tooling115 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

marked 18115 changes

Breaking changes 7

  • A code fence can now be closed only by a fence using the opening fence character.

    18.1.3release notes

  • A GFM www autolink now starts only at a word boundary.

    18.1.3release notes

  • Blank lines are no longer allowed inside a link reference definition label.

    18.1.3release notes

  • A whitespace-only line no longer continues a block quote paragraph.

    18.1.2release notes

  • Unbalanced parentheses in link destinations are now rejected.

    18.1.0release notes

  • GFM email autolinks are rejected when their domain ends in an underscore or hyphen.

    18.0.12release notes

  • Trailing blank lines are trimmed from block tokens.

    18.0.0release notes

Security 1

New APIs and options 2

  • The lexer state now includes lastToken.

    18.2.0release notes

  • Adds lexer state that enables failing fast during link token generation.

    18.1.0release notes

Performance 11

  • The emphasis closer scan is skipped for inline runs without a delimiter.

    18.2.1release notes

  • The first character is checked before inline tokenizer regexes.

    18.2.1release notes

  • Residual O(n²) parse time on unmatched emphasis and strikethrough delimiter runs is addressed.

    18.2.1release notes

  • Fixes backtracking in pedantic HTML parsing.

    18.1.3release notes

  • Avoids a quadratic scan when emphasis delimiters are unmatched.

    18.1.3release notes

  • Parsing is about 16% faster by skipping em/strong masking for runs without *, _ or ~.

    18.1.2release notes

  • Nested lists avoid repeated raw string copies, improving parsing performance.

    18.1.1release notes

  • walkTokens now runs in linear time by appending values in place.

    18.1.1release notes

  • Avoids O(n^2) backtracking during HTML block closing and tilde interruption parsing.

    18.0.7release notes

  • Avoids O(n^2) masked source rebuilding during inline tokenization.

    18.0.7release notes

  • Avoids O(n^2) backtracking when processing inline link hrefs.

    18.0.6release notes

Fixes and other changes 94

  • A tab after the block quote marker's space is kept literal.

    18.2.1release notes

  • A lazy line that starts an HTML tag can continue a block quote paragraph.

    18.2.1release notes

  • A block quote now ends at a lazy line after an empty list item.

    18.2.1release notes

  • Tabs that are code content under a block quote are kept.

    18.2.1release notes

  • A mid-run opener can close against a delimiter that can also open.

    18.2.1release notes

  • Trailing blank lines in fenced code are preserved.

    18.2.1release notes

  • HTML blocks now allow tabs between the tag name and attributes.

    18.2.1release notes

  • Links generated by inline tokenizers are now parsed.

    18.2.1release notes

  • A link destination in angle brackets is rejected if it contains an unescaped < or >.

    18.2.1release notes

  • Bracket escapes inside code spans in link text are no longer stripped.

    18.2.1release notes

  • A list item now ends before a lazy line after an empty or non-paragraph nested block.

    18.2.1release notes

  • The CLI waits for stdout before exiting.

    18.2.1release notes

  • An autolink or inline HTML line can start or continue a setext heading.

    18.2.1release notes

  • Rejected table candidates remain in the preceding paragraph.

    18.2.1release notes

  • A task item's checkbox marker is removed from its own text.

    18.2.1release notes

  • Custom output types are preserved in tokenizer overrides.

    18.2.1release notes

  • Emphasis can open after the other delimiter character.

    18.2.0release notes

  • Emphasis can open and close inside angle brackets that are not HTML.

    18.2.0release notes

  • Hard line breaks are preserved in image alt text.

    18.2.0release notes

  • Named extension renderers preserve a return value of zero.

    18.2.0release notes

  • Text after a heading or code block in a nested list item no longer gets pulled into the outer item.

    18.2.0release notes

  • A blockquote now ends before a lazy line after a table.

    18.1.3release notes

  • Extension names are isolated from Object.prototype.

    18.1.3release notes

  • An escaped closing parenthesis or quote no longer closes an inline link or title.

    18.1.3release notes

  • Internal whitespace is collapsed when link labels are normalized.

    18.1.3release notes

  • A list item now ends before a lazy line after an HTML block.

    18.1.3release notes

  • When outputting tokens, the CLI now honors defaults and configuration.

    18.1.3release notes

  • A block quote stays open after a lazy line in a nested block quote.

    18.1.3release notes

  • Zero-valued results from custom renderers are now preserved.

    18.1.3release notes

  • Trailing tabs after a setext heading underline are now allowed.

    18.1.3release notes

  • Task list items are recognized when a tab follows the checkbox.

    18.1.3release notes

  • Promise arrays returned from walkTokens extensions are now awaited.

    18.1.3release notes

  • Per-call async options are now honored when composing hooks.

    18.1.2release notes

  • A tab after the block quote marker expands to the next tab stop.

    18.1.2release notes

  • The CLI now awaits config functions before parsing.

    18.1.2release notes

  • Emphasis flanking and rules 9-10 are applied to the whole delimiter run.

    18.1.2release notes

  • An unclosed inline raw tag no longer unescapes later blocks.

    18.1.2release notes

  • Lazy lines after a list are kept in a nested blockquote.

    18.1.2release notes

  • Duplicate link definitions are retained in the tokens.

    18.1.2release notes

  • A line starting with # but no space is kept in the list item.

    18.1.2release notes

  • Nested image alt formatting is rendered as plain text.

    18.1.2release notes

  • The CLI now creates no-clobber output files atomically.

    18.1.2release notes

  • Lazy setext underlines in list items are kept as text.

    18.1.2release notes

  • A tab or end of input after a type 6 HTML block tag name is now allowed.

    18.1.2release notes

  • Blockquotes now end before a lazy line following a heading, horizontal rule, or HTML block.

    18.1.1release notes

  • Decoded character references no longer form a new character reference.

    18.1.1release notes

  • The CLI now honors an explicitly empty string input.

    18.1.1release notes

  • Backslashes in code spans no longer hide emphasis.

    18.1.1release notes

  • Indented and type 3–5 HTML blocks can now interrupt a paragraph.

    18.1.1release notes

  • pre, script, style, and textarea are matched as whole tag names.

    18.1.1release notes

  • Enclosing link state is preserved after parsing images.

    18.1.1release notes

  • List continuation indentation now respects tab stops.

    18.1.1release notes

  • CLI configuration files can now be loaded using top-level await.

    18.1.0release notes

  • Avoids cubic backtracking on unicode whitespace in link destinations.

    18.1.0release notes

  • GFM protocol autolinks are now supported.

    18.0.14release notes

  • Setext heading text now allows indented lines.

    18.0.14release notes

  • Internal tabs in list item content are now preserved.

    18.0.14release notes

  • Whitespace is now stripped when normalizing link reference labels.

    18.0.14release notes

  • Numeric character references are now decoded in text.

    18.0.14release notes

  • Text following an empty nested blockquote is now preserved.

    18.0.14release notes

  • Leading whitespace after a hard line break is now removed.

    18.0.13release notes

  • HTML block start conditions are now matched when ending a list item.

    18.0.13release notes

  • A tab following spaces in an indented code block is now stripped.

    18.0.13release notes

  • Raw tokens are now respected when closing link labels.

    18.0.13release notes

  • Reference link labels are now case-folded during parsing.

    18.0.13release notes

  • Tabs are now allowed in the thematic break that ends a list item.

    18.0.13release notes

  • A tab is now allowed before the closing sequence of an ATX heading.

    18.0.12release notes

  • Character references in autolink destinations are now escaped.

    18.0.12release notes

  • Empty code blocks no longer receive an added newline.

    18.0.12release notes

  • Each content line removes up to the fence indentation.

    18.0.12release notes

  • HTML tags containing invalid characters in their names are now rejected.

    18.0.12release notes

  • Link labels now allow one additional level of nested brackets.

    18.0.12release notes

  • inlineTokens rebuilds the reflink-mask preamble for each call.

    18.0.11release notes

  • Links are no longer nested inside other links during parsing.

    18.0.11release notes

  • Rejected reference links retain emphasis in their text.

    18.0.11release notes

  • The em/strong mask now stays the same length as the source, correcting parsing behavior.

    18.0.10release notes

  • Backtick fences at EOF after paragraphs are now parsed correctly.

    18.0.10release notes

  • Task checkboxes are placed after list looseness is finalized, correcting list parsing.

    18.0.10release notes

  • Blockquote continuation no longer produces spurious deeper nesting during Markdown parsing.

    18.0.9release notes

  • Pedantic emphasis parsing is corrected for foo: and "word" patterns.

    18.0.9release notes

  • An unmatched strong run before emphasis now stays literal during Markdown parsing.

    18.0.9release notes

  • Extensions returning false now fall back to the default checkbox renderer.

    18.0.8release notes

  • Treats a line containing only tabs as a blank line between paragraphs.

    18.0.7release notes

  • Preserves code spans when they appear adjacent to tildes.

    18.0.7release notes

  • Keeps an empty list after a blockquote as a sibling block.

    18.0.7release notes

  • Recognizes setext headings whose first line starts with #.

    18.0.7release notes

  • Preserves trailing text on HTML block close lines for processing instructions, declarations, and CDATA.

    18.0.6release notes

  • Fixes parsing of ordered lists that follow blockquotes.

    18.0.6release notes

  • Parsing now handles empty list items that have a trailing space.

    18.0.5release notes

  • The CLI now correctly reads input from stdin.

    18.0.4release notes

  • Setext heading text no longer incorrectly receives a task checkbox.

    18.0.3release notes

  • Ensures the lookbehind regex is evaluated correctly by minifiers.

    18.0.1release notes

  • GFM table tokens no longer greedily capture trailing newlines.

    18.0.0release notes

  • Heading and definition tokens no longer greedily capture multiple newlines.

    18.0.0release notes

marked 1723 changes

Breaking changes 2

  • Consecutive text tokens in lists behave differently, which may affect code consuming or producing list tokens.

    17.0.0release notes

  • The listItem renderer is simplified, potentially requiring updates to custom renderer implementations.

    17.0.0release notes

Security 3

  • Catastrophic backtracking (ReDoS) in the link/reflink label regex was fixed.

    17.0.5release notes

  • Prevents ReDoS in the inline link regular expression title group.

    17.0.4release notes

  • Image alt text is now escaped, preventing unescaped content in rendered output.

    17.0.3release notes

New APIs and options 3

Performance 1

  • Quadratic complexity in the emStrongLDelim regex was prevented.

    17.0.5release notes

Behavior and default changes 1

  • Loose list text tokens now use paragraph type in the list tokenizer.

    17.0.0release notes

Fixes and other changes 13

  • The CLI now uses a file URL when importing configuration.

    17.0.6release notes

  • Avoided a race condition when using async parallel parse or parseInline with hooks.

    17.0.6release notes

  • The CLI now honors a positional input file.

    17.0.6release notes

  • Trailing whitespace is trimmed from lheading text.

    17.0.5release notes

  • renderer.parser is reassigned at the start of each parse call to ensure fresh parser state.

    17.0.5release notes

  • Single-tilde strikethrough false positives were prevented.

    17.0.5release notes

  • tokenizer.lexer is reassigned at the start of each parse call to ensure fresh parser state.

    17.0.5release notes

  • Fixed blockquote parsing after a list.

    17.0.2release notes

  • Fixed parsing of empty list items.

    17.0.2release notes

  • Fixed list parsing when tabs are used.

    17.0.2release notes

  • Fixed incorrect indentation handling for list items.

    17.0.2release notes

  • Fixed strikethrough flanking-rule handling.

    17.0.2release notes

  • Block elements in task items are handled correctly when parsing Markdown.

    17.0.1release notes

marked 166 changes

Breaking changes 3

  • The CommonJS build is removed.

    16.0.0release notes

  • This file is removed; use ./lib/marked.umd.js instead.

    16.0.0release notes

  • The minimum supported Node.js version is now 20, enabling require to load marked.esm.js.

    16.0.0release notes

Tooling 1

  • Jest users may need to transform marked because Jest does not work with ESM by default.

    16.0.0release notes

Fixes and other changes 2

  • Avoids RegExp lookbehind assertions, improving compatibility with runtimes that do not support them.

    16.4.2release notes

  • Resolved an even-numbered backtick precedence issue in parsing.

    16.4.1release notes

marked 151 changes

Breaking changes 1

  • HTML is escaped in renderers instead of tokenizers for all tokens.

    15.0.0release notes

marked 143 changes

Breaking changes 3

  • The returned type now reflects the async option.

    14.0.0release notes

  • An error is thrown when async is false but an extension sets async to true.

    14.0.0release notes

  • useNewRenderer was removed as part of removing the old renderer.

    14.0.0release notes

marked 1310 changes

Breaking changes 2

  • Renderers receive token objects instead of multiple parameters, and parsing logic moves from the parser to renderers.

    13.0.0release notes

  • Renderer extensions that change marked renderers need to use this option and accept a token object instead of multiple parameters.

    13.0.0release notes

New APIs and options 5

  • The Renderer object now exposes the parser as a property.

    13.0.0release notes

  • A space renderer was added and returns an empty string by default.

    13.0.0release notes

  • The TableCell token now has an align property.

    13.0.0release notes

  • The TableCell token now has a header property.

    13.0.0release notes

  • A TableRow token was added.

    13.0.0release notes

Behavior and default changes 1

  • Block text tokens are now sent to the text renderer.

    13.0.0release notes

Fixes and other changes 2

  • Blockquote code continuation was fixed.

    13.0.0release notes

  • A space token is added after blockquotes and horizontal rules when there are multiple newlines.

    13.0.0release notes

marked 123 changes

Breaking changes 1

  • HTML block tag handling adds search and removes source to match the updated CommonMark spec.

    12.0.0release notes

Behavior and default changes 1

  • Punctuation handling now includes Unicode punctuation and symbol categories.

    12.0.0release notes

Fixes and other changes 1

  • HTML comment handling now includes the forms <!--> and <!--->.

    12.0.0release notes

marked 111 changes

Breaking changes 1

  • The rules object changed to support proper typing, and some intermediate rules were removed.

    11.0.0release notes

marked 101 changes

Breaking changes 1

marked 82 changes

Breaking changes 1

  • Deprecated options were removed; the notes point to extensions as the way to enable the removed options.

    8.0.0release notes

New APIs and options 1

marked 72 changes

Breaking changes 2

marked 61 changes

Breaking changes 1

  • Marked migrated to TypeScript, a breaking change that may affect developers using its types.

    6.0.0release notes

marked 511 changes

Breaking changes 1

  • The minimum supported Node.js version is now v18.

    5.0.0release notes

Deprecations 9

  • The baseUrl option is deprecated; use marked-base-url instead.

    5.0.0release notes

  • The callback option is deprecated; use marked-highlight instead.

    5.0.0release notes

  • The headerIds option is deprecated; use marked-gfm-heading-id instead.

    5.0.0release notes

  • The headerPrefix option is deprecated; use marked-gfm-heading-id instead.

    5.0.0release notes

  • The highlight option is deprecated; use marked-highlight instead.

    5.0.0release notes

  • The langPrefix option is deprecated; use marked-highlight instead.

    5.0.0release notes

  • The mangle option is deprecated; use marked-mangle instead.

    5.0.0release notes

  • The smartypants option is deprecated; use marked-smartypants instead.

    5.0.0release notes

  • The xhtml option is deprecated; use marked-xhtml instead.

    5.0.0release notes

New APIs and options 1

marked 43 changes

Breaking changes 3

  • The default export was removed; import marked as a named export or destructure it from require('marked').

    4.0.0release notes

  • The file was removed; use /marked.min.js in a script tag instead.

    4.0.0release notes

  • When using marked in a script tag, call marked.parse(...) instead of marked(...).

    4.0.0release notes

marked 310 changes

Breaking changes 8

  • List parsing now has full CommonMark compliance.

    3.0.0release notes

  • The inlineText tokenizer function signature has changed.

    3.0.0release notes

  • Node 10 is no longer supported.

    3.0.0release notes

  • The nptable tokenizer was removed and merged with the table tokenizer.

    3.0.0release notes

  • Table token headers now contain cell objects with text and tokens; cells was replaced by rows, whose cells also contain text and tokens.

    3.0.0release notes

  • The tag tokenizer function signature has changed.

    3.0.0release notes

  • The extensions tokenizer this object now includes the lexer; this.inlineTokens becomes this.lexer.inline.

    3.0.0release notes

  • The extensions renderer this object now includes the parser; this.parseInline becomes this.parser.parseInline.

    3.0.0release notes

New APIs and options 1

  • A module field was added to package.json, changing package entry metadata.

    3.0.0release notes

Behavior and default changes 1

  • Tokenizers create their own child tokens with this.lexer.inline; token creation is queued until after all block tokens are created.

    3.0.0release notes

marked 26 changes

Breaking changes 4

  • The code tokenizer no longer receives all tokens as its second parameter.

    2.0.0release notes

  • The em and strong tokenizers have been merged into one emStrong tokenizer.

    2.0.0release notes

  • IE 11 is no longer officially supported, though it may still work; the es5 version remains available and may require polyfills.

    2.0.0release notes

  • The text tokenizer no longer receives all tokens as its second parameter.

    2.0.0release notes

Behavior and default changes 2

marked 17 changes

Breaking changes 1

  • The lexer output now includes inline tokens, changing the tokens returned to developers.

    1.0.0release notes

New APIs and options 2

  • The new method lets developers extend options.

    1.0.0release notes

  • A Tokenizer is available to allow extending token creation.

    1.0.0release notes

Behavior and default changes 1

  • Escape tokens are treated the same way as plain text tokens.

    1.0.0release notes

Fixes and other changes 3

  • Fixes the italics modifier breaking links that contain underscores.

    1.0.0release notes

  • Fixes incorrect closing-delimiter handling for consecutive occurrences.

    1.0.0release notes

  • Fixes intra-word emphasis matching the wrong asterisks.

    1.0.0release notes