unstale

npm / marked

marked

What changed in marked 16 to 18, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-17.

5 breaking4 security4 new APIs and options6 performance1 behavior and defaults65 fixes and other

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

npx @unstale/cli init

@unstale/cli 0.1.0 on npm

marked 1860 changes

Breaking changes 3

  • 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 1

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

    18.1.0release notes

Performance 5

  • 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 50

  • 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

  • The list tokenizer now adds a checkbox token, exposing checkbox information to token consumers.

    17.0.0release notes

  • Checkbox tokens now have a raw property.

    17.0.0release notes

  • Checkbox tokens now have a type property.

    17.0.0release notes

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 162 changes

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