Skip to content

mdastic@0.6.0

Latest

Choose a tag to compare

@remorses remorses released this 19 Nov 16:25
· 2 commits to main since this release

mdastic now matches what a fresh npm i remark remark-gfm remark-mdx remark-stringify installs today.

  1. stringify matches mdast-util-to-markdown 2.2.3. Fewer escapes (intraword _ stays as is), emphasis and strong pick * or _ so every run parses back the same, tight lists keep blank lines where needed, and link text that looks like a definition gets an empty title.
    stringify(parse('snake_case and x86_64'))  // 'snake_case and x86_64\n', was 'snake\\_case and x86\\_64\n'
  2. Custom unsafe patterns support beforeNode, afterNode and unicode.
  3. GFM tables match mdast-util-gfm-table 2.0.1. Rows keep their own cell count instead of being padded.
  4. GFM autolink literals match mdast-util-gfm-autolink-literal 2.1.0. Emails after punctuation like / link, mailto: and xmpp: addresses link with their scheme, and hosts that start with punctuation no longer link.
    parse('mailto:a@b.co', { syntax: [gfm()] })  // link 'mailto:a@b.co'
  5. Task list checks match mdast-util-gfm-task-list-item 2.0.1. Checks after definitions, empty checked items and bulletOrdered: ")" now serialize correctly.
  6. Multi-line JSX attribute expressions are indented like mdast-util-mdx-jsx 3.2.1.