Packages

marked

18.2.1 · 16 Nov 2026MIT138.2M / weekRepositoryHomepagenpmAtom feed

Your version

3.0.0

major16 Aug 2021Where it was published

3.0.8 is the newest release of 3.x.

In short

9 breaking1 removed3 fixed

  • Breaking

    Add module field to package.json

  • Breaking

    Drop support for node 10.

  • Breaking

    Tokenizers will create their own tokens with this.lexer.inline(text, tokens). The inline function will queue the token creation until after all block tokens are created.

  • Breaking

    Extensions tokenizer this object will include the lexer as a property. this.inlineTokens becomes this.lexer.inline.

  • Breaking

    Extensions renderer this object will include the parser as a property. this.parseInline becomes this.parser.parseInline.

  • Breaking

    tag and inlineText tokenizer function signatures have changed.

  • Breaking

    nptable tokenizer is removed and merged with table tokenizer.

  • Breaking

    table tokens header property changed to contain an array of objects for each header cell with text and tokens properties.

Security

2 advisories affect 3.0.0; 4.0.10 fixes them

Release note

Bug Fixes

  • Tokenizers lex their own child tokens

  • Add module field to package.json

  • Removed

    Drop node 10 support

  • Full Commonmark compliance for Lists

  • Refactor table tokens

Breaking changes

  • Breaking

    Drop support for node 10.

  • Breaking

    Add module field to package.json


  • Breaking

    Tokenizers will create their own tokens with this.lexer.inline(text, tokens). The inline function will queue the token creation until after all block tokens are created.

  • Breaking

    Extensions tokenizer this object will include the lexer as a property. this.inlineTokens becomes this.lexer.inline.

  • Breaking

    Extensions renderer this object will include the parser as a property. this.parseInline becomes this.parser.parseInline.

  • Breaking

    tag and inlineText tokenizer function signatures have changed.


  • Breaking

    nptable tokenizer is removed and merged with table tokenizer.

  • Breaking

    table tokens header property changed to contain an array of objects for each header cell with text and tokens properties.

  • Breaking

    table tokens cells property changed to rows and is an array of rows where each row contains an array of objects for each cell with text and tokens properties.

v2 table token:

{
  "type": "table",
  "align": [null, null],
  "raw": "| a | b |\n|---|---|\n| 1 | 2 |\n",
  "header": ["a", "b"],
  "cells": [["1", "2"]],
  "tokens": {
    "header": [
      [{ "type": "text", "raw": "a", "text": "a" }],
      [{ "type": "text", "raw": "b", "text": "b" }]
    ],
    "cells": [[
      [{ "type": "text", "raw": "1", "text": "1" }],
      [{ "type": "text", "raw": "2", "text": "2" }]
    ]]
  }
}

v3 table token:

{
  "type": "table",
  "align": [null, null],
  "raw": "| a | b |\n|---|---|\n| 1 | 2 |\n",
  "header": [
    {
      "text": "a",
      "tokens": [{ "type": "text", "raw": "a", "text": "a" }]
    },
    {
      "text": "b",
      "tokens": [{ "type": "text", "raw": "b", "text": "b" }]
    }
  ],
  "rows": [
    {
      "text": "1",
      "tokens": [{ "type": "text", "raw": "1", "text": "1" }]
    },
    {
      "text": "2",
      "tokens": [{ "type": "text", "raw": "2", "text": "2" }]
    }
  ]
}

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.