diff --git a/doc/plugins.md b/doc/plugins.md index 74d9f874..ed6c36f4 100644 --- a/doc/plugins.md +++ b/doc/plugins.md @@ -8,11 +8,11 @@ This page lists existing plugins. ## Contents -* [List of plugins](#list-of-plugins) -* [List of presets](#list-of-presets) -* [List of utilities](#list-of-utilities) -* [Use plugins](#use-plugins) -* [Create plugins](#create-plugins) +* [List of plugins](#list-of-plugins) +* [List of presets](#list-of-presets) +* [List of utilities](#list-of-utilities) +* [Use plugins](#use-plugins) +* [Create plugins](#create-plugins) ## List of plugins @@ -32,296 +32,436 @@ More plugins can be found on GitHub tagged with the The list of plugins: -* 🟒 [`remark-a11y-emoji`](https://github.com/florianeckerstorfer/remark-a11y-emoji) - β€” accessible emoji -* ⚠️ [`remark-abbr`](https://github.com/zestedesavoir/zmarkdown/tree/HEAD/packages/remark-abbr#readme) - β€” new syntax for abbreviations (new node type, rehype compatible) -* ⚠️ [`remark-admonitions`](https://github.com/elviswolcott/remark-admonitions) - β€” new syntax for admonitions - (πŸ‘‰ **note**: [`remark-directive`][d] is similar and up to date) -* ⚠️ [`remark-align`](https://github.com/zestedesavoir/zmarkdown/tree/HEAD/packages/remark-align#readme) - β€” new syntax to align text or blocks (new node types, rehype - compatible) -* ⚠️ [`remark-attr`](https://github.com/arobase-che/remark-attr) - β€” new syntax to add attributes to markdown -* 🟒 [`remark-behead`](https://github.com/mrzmmr/remark-behead) - β€” increase or decrease heading depth -* 🟒 [`remark-breaks`](https://github.com/remarkjs/remark-breaks) - – hard breaks w/o needing spaces (like on issues) -* 🟒 [`remark-capitalize`](https://github.com/zeit/remark-capitalize) - – transform all titles w/ [`title.sh`](https://github.com/zeit/title) -* 🟒 [`remark-capitalize-headings`](https://github.com/Xunnamius/unified-utils/blob/main/packages/remark-capitalize-headings) - – selectively capitalize headings - (πŸ‘‰ **note**: alternative to [`remark-capitalize`](https://github.com/zeit/remark-capitalize)) -* 🟒 [`remark-cite`](https://github.com/benrbray/remark-cite) - – new syntax for Pandoc-style citations -* 🟒 [`remark-cloudinary-docusaurus`](https://github.com/johnnyreilly/remark-cloudinary-docusaurus) - – allows Docusaurus to use Cloudinary to serve optimised images -* 🟒 [`remark-code-blocks`](https://github.com/mrzmmr/remark-code-blocks) - β€” select and store code blocks -* 🟒 [`remark-code-extra`](https://github.com/samlanning/remark-code-extra) - β€” add to or transform the HTML output of code blocks (rehype compatible) -* 🟒 [`remark-code-frontmatter`](https://github.com/samlanning/remark-code-frontmatter) - β€” extract frontmatter from code blocks -* 🟒 [`remark-code-import`](https://github.com/kevin940726/remark-code-import) - β€” populate code blocks from files -* 🟒 [`remark-code-screenshot`](https://github.com/Swizec/remark-code-screenshot) - – turn code blocks into `carbon.now.sh` screenshots -* 🟒 [`remark-code-title`](https://github.com/kevinzunigacuellar/remark-code-title) - β€” add titles to code blocks -* 🟒 [`remark-codesandbox`](https://github.com/kevin940726/remark-codesandbox) - – create CodeSandbox from code blocks -* 🟒 [`remark-collapse`](https://github.com/Rokt33r/remark-collapse) - β€” make a section collapsible -* 🟒 [`remark-comment-config`](https://github.com/remarkjs/remark-comment-config) - β€” configure remark w/ comments -* ⚠️ [`remark-comments`](https://github.com/zestedesavoir/zmarkdown/tree/HEAD/packages/remark-comments#readme) - β€” new syntax to ignore things -* ⚠️ [`remark-container`](https://github.com/zWingz/remark-container) - β€” new syntax for containers - (πŸ‘‰ **note**: [`remark-directive`][d] is similar and up to date) -* ⚠️ [`remark-containers`](https://github.com/Nevenall/remark-containers) - β€” new syntax for containers - (πŸ‘‰ **note**: [`remark-directive`][d] is similar and up to date) -* 🟒 [`remark-contributors`](https://github.com/remarkjs/remark-contributors) - β€” add a table of contributors -* 🟒 [`remark-copy-linked-files`](https://github.com/sergioramos/remark-copy-linked-files) - β€” find and copy files linked files to a destination directory -* ⚠️ [`remark-custom-blocks`](https://github.com/zestedesavoir/zmarkdown/tree/HEAD/packages/remark-custom-blocks#readme) - β€” new syntax for custom blocks (new node types, rehype compatible) - (πŸ‘‰ **note**: [`remark-directive`][d] is similar and up to date) -* 🟒 [`remark-definition-list`](https://github.com/wataru-chocola/remark-definition-list) - β€” support definition lists -* 🟒 [`remark-defsplit`](https://github.com/remarkjs/remark-defsplit) - β€” change links and images to references w/ separate definitions -* ⚠️ [`remark-disable-tokenizers`](https://github.com/zestedesavoir/zmarkdown/tree/HEAD/packages/remark-disable-tokenizers#readme) - β€” turn some or all remark’s tokenizers on or off -* 🟒 [`remark-directive`](https://github.com/remarkjs/remark-directive) - β€” new syntax for directives (generic extensions) -* 🟒 [`remark-directive-rehype`](https://github.com/IGassmann/remark-directive-rehype) - β€” turn [directives][d] into HTML custom elements (rehype compatible) -* 🟒 [`remark-docx`](https://github.com/inokawa/remark-docx) - β€” compile markdown to docx -* 🟒 [`remark-dropcap`](https://github.com/brev/remark-dropcap) - β€” fancy and accessible drop caps -* 🟒 [`remark-embed-images`](https://github.com/remarkjs/remark-embed-images) - β€” embed local images as base64-encoded data URIs -* 🟒 [`remark-emoji`](https://github.com/rhysd/remark-emoji) - β€” transform Gemoji short-codes to emoji -* 🟒 [`remark-extended-table`](https://github.com/wataru-chocola/remark-extended-table) - β€” extended table syntax allowing colspan / rowspan -* 🟒 [`remark-extract-frontmatter`](https://github.com/mrzmmr/remark-extract-frontmatter) - β€” store front matter in vfiles -* 🟒 [`remark-first-heading`](https://github.com/laat/remark-first-heading) - β€” change the first heading in a document -* 🟒 [`remark-fix-guillemets`](https://github.com/zestedesavoir/zmarkdown/tree/HEAD/packages/remark-fix-guillemets#readme) - β€” support ASCII guillements (`<<`, `>>`) mapping them to HTML -* 🟒 [`remark-flexible-code-titles`](https://github.com/ipikuka/remark-flexible-code-titles) - β€” add titles or/and containers for code blocks with customizable attributes -* 🟒 [`remark-flexible-containers`](https://github.com/ipikuka/remark-flexible-containers) - β€” add custom/flexible containers with customizable properties -* 🟒 [`remark-flexible-markers`](https://github.com/ipikuka/remark-flexible-markers) - β€” add custom/flexible mark element with customizable properties -* 🟒 [`remark-flexible-paragraphs`](https://github.com/ipikuka/remark-flexible-paragraphs) - β€” add custom/flexible paragraphs with customizable properties -* 🟒 [`remark-frontmatter`](https://github.com/remarkjs/remark-frontmatter) - – support frontmatter (yaml, toml, and more) -* 🟒 [`remark-gemoji`](https://github.com/remarkjs/remark-gemoji) - β€” better support for Gemoji shortcodes -* ⚠️ [`remark-generic-extensions`](https://github.com/medfreeman/remark-generic-extensions) - β€” new syntax for the CommonMark generic directive extension - (πŸ‘‰ **note**: [`remark-directive`][d] is similar and up to date) -* 🟒 [`remark-gfm`](https://github.com/remarkjs/remark-gfm) - β€” support GFM (autolink literals, footnotes, strikethrough, tables, - tasklists) -* 🟒 [`remark-git-contributors`](https://github.com/remarkjs/remark-git-contributors) - β€” add a table of contributors based on Git history, options, and more -* 🟒 [`remark-github`](https://github.com/remarkjs/remark-github) - β€” autolink references to commits, issues, pull-requests, and users -* 🟒 [`remark-github-admonitions-to-directives`](https://github.com/incentro-dc/remark-github-admonitions-to-directives) - β€” convert GitHub's blockquote-based admonitions syntax to directives syntax -* 🟒 [`remark-github-beta-blockquote-admonitions`](https://github.com/myl7/remark-github-beta-blockquote-admonitions) - β€” [GitHub beta blockquote-based admonitions](https://github.com/github/feedback/discussions/16925) -* 🟒 [`remark-github-blockquote-alert`](https://github.com/jaywcjlove/remark-github-blockquote-alert) - β€” remark plugin to add support for [GitHub Alert](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts) -* ⚠️ [`remark-grid-tables`](https://github.com/zestedesavoir/zmarkdown/tree/HEAD/packages/remark-grid-tables#readme) - β€” new syntax to describe tables (rehype compatible) -* 🟒 [`remark-heading-id`](https://github.com/imcuttle/remark-heading-id) - β€” custom heading id support `{#custom-id}` -* 🟒 [`remark-heading-gap`](https://github.com/remarkjs/remark-heading-gap) - β€” serialize w/ more blank lines between headings -* 🟒 [`@vcarl/remark-headings`](https://github.com/vcarl/remark-headings) - β€” extract a list of headings as data -* 🟒 [`remark-hexo`](https://github.com/bennycode/remark-hexo) - β€” renders [Hexo tags](https://hexo.io/docs/tag-plugins) -* 🟒 [`remark-highlight.js`](https://github.com/remarkjs/remark-highlight.js) - β€” highlight code blocks w/ [highlight.js](https://github.com/isagalaev/highlight.js) - (rehype compatible) -* 🟒 [`remark-hint`](https://github.com/sergioramos/remark-hint) - β€” add hints/tips/warnings to markdown -* 🟒 [`remark-html`](https://github.com/remarkjs/remark-html) - β€” serialize markdown as HTML -* ⚠️ [`remark-iframes`](https://github.com/zestedesavoir/zmarkdown/tree/HEAD/packages/remark-iframes#readme) - β€” new syntax to create iframes (new node type, rehype compatible) -* 🟒 [`remark-ignore`](https://github.com/Xunnamius/unified-utils/blob/main/packages/remark-ignore) - β€” use comments to exclude nodes from transformation -* 🟒 [`remark-images`](https://github.com/remarkjs/remark-images) - β€” add an improved image syntax -* 🟒 [`remark-img-links`](https://github.com/Pondorasti/remark-img-links) - β€” prefix relative image paths with an absolute URL -* 🟒 [`remark-inline-links`](https://github.com/remarkjs/remark-inline-links) - β€” change references and definitions to links and images -* 🟒 [`remark-ins`](https://github.com/ipikuka/remark-ins) - β€” add ins element for inserted texts opposite to deleted texts -* 🟒 [`remark-join-cjk-lines`](https://github.com/purefun/remark-join-cjk-lines) - β€” remove extra space between CJK Characters. -* ⚠️ [`remark-kbd`](https://github.com/zestedesavoir/zmarkdown/tree/HEAD/packages/remark-kbd#readme) - β€” new syntax for keyboard keys (new node type, rehype compatible) -* ⚠️ [`remark-kbd-plus`](https://github.com/twardoch/remark-kbd-plus) - β€” new syntax for keyboard keys w/ plusses (new node type, rehype - compatible) -* 🟒 [`remark-license`](https://github.com/remarkjs/remark-license) - β€” add a license section -* 🟒 [`remark-link-rewrite`](https://github.com/rjanjic/remark-link-rewrite) - β€” customize link URLs dynamically -* 🟒 [`remark-linkify-regex`](https://gitlab.com/staltz/remark-linkify-regex) - β€” change text matching a regex to links -* 🟒 [`remark-lint`](https://github.com/remarkjs/remark-lint) - β€” check markdown code style -* 🟒 [`remark-macro`](https://github.com/dimerapp/remark-macro) - β€” support for block macros (new node types, rehype compatible) -* 🟒 [`remark-man`](https://github.com/remarkjs/remark-man) - β€” serialize markdown as man pages (roff) -* 🟒 [`remark-math`](https://github.com/remarkjs/remark-math) - β€” new syntax for math (new node types, rehype compatible) -* 🟒 [`remark-mdx`](https://github.com/mdx-js/mdx/tree/main/packages/remark-mdx) - β€” support MDX (JSX, expressions, ESM) -* 🟒 [`remark-mentions`](https://github.com/FinnRG/remark-mentions) - β€” replace @ mentions with links -* 🟒 [`remark-mermaidjs`](https://github.com/remcohaszing/remark-mermaidjs) - β€” transform mermaid code blocks into inline SVGs -* 🟒 [`remark-message-control`](https://github.com/remarkjs/remark-message-control) - β€” turn some or all messages on or off -* 🟒 [`remark-normalize-headings`](https://github.com/remarkjs/remark-normalize-headings) - β€” make sure at most one top-level heading exists -* 🟒 [`remark-numbered-footnote-labels`](https://github.com/jackfletch/remark-numbered-footnote-labels) - β€” label footnotes w/ numbers -* 🟒 [`@agentofuser/remark-oembed`](https://github.com/agentofuser/remark-oembed) - β€” transform URLs for youtube, twitter, etc. embeds -* 🟒 [`remark-oembed`](https://github.com/sergioramos/remark-oembed) - β€” transform URLs surrounded by newlines into *asynchronously* loading - embeds -* 🟒 [`remark-package-dependencies`](https://github.com/unlight/remark-package-dependencies) - β€” inject your dependencies -* ⚠️ [`remark-parse-yaml`](https://github.com/landakram/remark-parse-yaml) - β€” parse YAML nodes and expose their value as `parsedValue` -* 🟒 [`remark-pdf`](https://github.com/inokawa/remark-pdf) - β€” compile markdown to pdf -* ⚠️ [`remark-ping`](https://github.com/zestedesavoir/zmarkdown/tree/HEAD/packages/remark-ping#readme) - β€” new syntax for mentions w/ configurable existence check (new node - type, rehype compatible) -* 🟒 [`remark-prettier`](https://github.com/remcohaszing/remark-prettier) - β€” check and format markdown using Prettier -* 🟒 [`remark-prism`](https://github.com/sergioramos/remark-prism) - β€” highlight code blocks w/ [Prism](https://prismjs.com/) (supporting most - Prism plugins) -* ⚠️ [`remark-redact`](https://github.com/seafoam6/remark-redact) - β€” new syntax to conceal text matching a regex -* 🟒 [`remark-redactable`](https://github.com/code-dot-org/remark-redactable) - β€” write plugins to redact content from a markdown document, - then restore it later -* 🟒 [`remark-reference-links`](https://github.com/remarkjs/remark-reference-links) - β€” transform links and images into references and definitions -* 🟒 [`remark-rehype`](https://github.com/remarkjs/remark-rehype) - β€” transform to [rehype](https://github.com/rehypejs/rehype) -* 🟒 [`remark-relative-links`](https://github.com/zslabs/remark-relative-links) - β€” change absolute URLs to relative ones -* 🟒 [`remark-remove-comments`](https://github.com/alvinometric/remark-remove-comments) - β€” remove HTML comments from the processed output -* 🟒 [`remark-remove-unused-definitions`](https://github.com/Xunnamius/unified-utils/blob/main/packages/remark-remove-unused-definitions) - β€” remove unused reference-style link definitions -* 🟒 [`remark-remove-url-trailing-slash`](https://github.com/Xunnamius/unified-utils/blob/main/packages/remark-remove-url-trailing-slash) - β€” remove trailing slashes from the ends of all URL paths -* 🟒 [`remark-renumber-references`](https://github.com/Xunnamius/unified-utils/blob/main/packages/remark-renumber-references) - β€” renumber numeric reference-style link ids contiguously starting from 1 -* 🟒 [`remark-retext`](https://github.com/remarkjs/remark-retext) - β€” transform to [retext](https://github.com/retextjs/retext) -* 🟒 [`remark-ruby`](https://github.com/laysent/remark-ruby) - β€” new syntax for ruby (furigana) -* 🟒 [`remark-sectionize`](https://github.com/jake-low/remark-sectionize) - β€” wrap headings and subsequent content in section tags (new node type, - rehype compatible) -* ⚠️ [`remark-shortcodes`](https://github.com/djm/remark-shortcodes) - β€” new syntax for Wordpress- and Hugo-like shortcodes (new node type) - (πŸ‘‰ **note**: [`remark-directive`][d] is similar and up to date) -* 🟒 [`remark-simple-plantuml`](https://github.com/akebifiky/remark-simple-plantuml) - β€” turn PlantUML code blocks to images -* 🟒 [`remark-slate`](https://github.com/hanford/remark-slate) - β€” compile markdown to [Slate nodes](https://docs.slatejs.org/concepts/02-nodes) -* 🟒 [`remark-slate-transformer`](https://github.com/inokawa/remark-slate-transformer) - β€” compile markdown to [Slate nodes](https://docs.slatejs.org/concepts/02-nodes) - and Slate nodes to markdown -* 🟒 [`remark-smartypants`](https://github.com/silvenon/remark-smartypants) - β€” SmartyPants -* 🟒 [`remark-smcat`](https://github.com/shedali/remark-smcat) - β€” state machine cat -* 🟒 [`remark-sort-definitions`](https://github.com/Xunnamius/unified-utils/blob/main/packages/remark-sort-definitions) - β€” reorder reference-style link definitions -* 🟒 [`remark-sources`](https://github.com/unlight/remark-sources) - β€” insert source code -* 🟒 [`remark-strip-badges`](https://github.com/remarkjs/remark-strip-badges) - β€” remove badges (such as `shields.io`) -* 🟒 [`remark-strip-html`](https://github.com/craftzdog/remark-strip-html) - β€” remove HTML -* 🟒 [`remark-squeeze-paragraphs`](https://github.com/remarkjs/remark-squeeze-paragraphs) - β€” remove empty paragraphs -* ⚠️ [`remark-sub-super`](https://github.com/zestedesavoir/zmarkdown/tree/HEAD/packages/remark-sub-super) - β€” new syntax for super- and subscript (new node types, rehype - compatible) -* ⚠️ [`remark-terms`](https://github.com/Nevenall/remark-terms) - β€” new customizable syntax for special terms and phrases -* 🟒 [`remark-textr`](https://github.com/remarkjs/remark-textr) - β€” transform text w/ [`Textr`](https://github.com/shuvalov-anton/textr) -* 🟒 [`remark-tight-comments`](https://github.com/Xunnamius/unified-utils/blob/main/packages/remark-tight-comments) - β€” selectively remove newlines around comments -* 🟒 [`remark-title`](https://github.com/RichardLitt/remark-title) - β€” check and add the document title -* 🟒 [`remark-toc`](https://github.com/remarkjs/remark-toc) - β€” add a table of contents -* 🟒 [`remark-torchlight`](https://github.com/torchlight-api/remark-torchlight) - β€” syntax highlighting powered by [torchlight.dev](https://torchlight.dev) -* 🟒 [`remark-tree-sitter`](https://github.com/samlanning/remark-tree-sitter) - β€” highlight code blocks in markdown files using - [Tree-sitter](https://tree-sitter.github.io/tree-sitter/) - (rehype compatible) -* 🟒 [`remark-truncate-links`](https://github.com/GaiAma/Coding4GaiAma/tree/HEAD/packages/remark-truncate-links) - β€” truncate/shorten urls not manually named -* 🟒 [`remark-twemoji`](https://github.com/madiodio/remark-twemoji) - β€” turn emoji into [Twemoji](https://github.com/twitter/twemoji) -* 🟒 [`remark-typedoc-symbol-links`](https://github.com/kamranayub/remark-typedoc-symbol-links) - β€” turn Typedoc symbol link expressions into markdown links -* 🟒 [`remark-typescript`](https://github.com/trevorblades/remark-typescript) - β€” turn TypeScript code to JavaScript -* 🟒 [`remark-typograf`](https://github.com/mavrin/remark-typograf) - β€” transform text w/ [Typograf](https://github.com/typograf) -* 🟒 [`remark-unlink`](https://github.com/remarkjs/remark-unlink) - β€” remove all links, references, and definitions -* 🟒 [`remark-unwrap-images`](https://github.com/remarkjs/remark-unwrap-images) - β€” remove the wrapping paragraph for images -* 🟒 [`remark-usage`](https://github.com/remarkjs/remark-usage) - β€” add a usage example -* 🟒 [`remark-utf8`](https://github.com/Swizec/remark-utf8) - β€” turn bolds, italics, and code into UTF 8 special characters -* 🟒 [`remark-validate-links`](https://github.com/remarkjs/remark-validate-links) - β€” check links to headings and files -* ⚠️ [`remark-variables`](https://github.com/mrzmmr/remark-variables) - β€” new syntax for variables -* 🟒 [`remark-vdom`](https://github.com/remarkjs/remark-vdom) - β€” compile markdown to [VDOM](https://github.com/Matt-Esch/virtual-dom/) -* 🟒 [`remark-wiki-link`](https://github.com/landakram/remark-wiki-link) - β€” new syntax for wiki links (rehype compatible) -* 🟒 [`remark-yaml-config`](https://github.com/remarkjs/remark-yaml-config) - β€” configure remark w/ YAML +* [`remark-a11y-emoji` + ](https://github.com/florianeckerstorfer/remark-a11y-emoji) + β€” accessible emoji +* ⚠️ [`remark-abbr` + ](https://github.com/zestedesavoir/zmarkdown/tree/HEAD/packages/remark-abbr#readme) + β€” new syntax for abbreviations (new node type, rehype compatible) +* ⚠️ [`remark-admonitions` + ](https://github.com/elviswolcott/remark-admonitions) + β€” new syntax for admonitions + (πŸ‘‰ **note**: [`remark-directive`][d] is similar and up to date) +* ⚠️ [`remark-align` + ](https://github.com/zestedesavoir/zmarkdown/tree/HEAD/packages/remark-align#readme) + β€” new syntax to align text or blocks (new node types, rehype + compatible) +* ⚠️ [`remark-attr` + ](https://github.com/arobase-che/remark-attr) + β€” new syntax to add attributes to markdown +* 🟒 [`remark-behead` + ](https://github.com/mrzmmr/remark-behead) + β€” increase or decrease heading depth +* 🟒 [`remark-breaks` + ](https://github.com/remarkjs/remark-breaks) + – hard breaks w/o needing spaces (like on issues) +* 🟒 [`remark-capitalize` + ](https://github.com/zeit/remark-capitalize) + – transform all titles w/ [`title.sh` + ](https://github.com/zeit/title) +* 🟒 [`remark-capitalize-headings` + ](https://github.com/Xunnamius/unified-utils/blob/main/packages/remark-capitalize-headings) + – selectively capitalize headings + (πŸ‘‰ **note**: alternative to [`remark-capitalize` + ](https://github.com/zeit/remark-capitalize)) +* 🟒 [`remark-cite` + ](https://github.com/benrbray/remark-cite) + – new syntax for Pandoc-style citations +* 🟒 [`remark-cloudinary-docusaurus` + ](https://github.com/johnnyreilly/remark-cloudinary-docusaurus) + – allows Docusaurus to use Cloudinary to serve optimised images +* 🟒 [`remark-code-blocks` + ](https://github.com/mrzmmr/remark-code-blocks) + β€” select and store code blocks +* 🟒 [`remark-code-extra` + ](https://github.com/samlanning/remark-code-extra) + β€” add to or transform the HTML output of code blocks (rehype compatible) +* 🟒 [`remark-code-frontmatter` + ](https://github.com/samlanning/remark-code-frontmatter) + β€” extract frontmatter from code blocks +* 🟒 [`remark-code-import` + ](https://github.com/kevin940726/remark-code-import) + β€” populate code blocks from files +* 🟒 [`remark-code-screenshot` + ](https://github.com/Swizec/remark-code-screenshot) + – turn code blocks into `carbon.now.sh` screenshots +* 🟒 [`remark-code-title` + ](https://github.com/kevinzunigacuellar/remark-code-title) + β€” add titles to code blocks +* 🟒 [`remark-codesandbox` + ](https://github.com/kevin940726/remark-codesandbox) + – create CodeSandbox from code blocks +* 🟒 [`remark-collapse` + ](https://github.com/Rokt33r/remark-collapse) + β€” make a section collapsible +* 🟒 [`remark-comment-config` + ](https://github.com/remarkjs/remark-comment-config) + β€” configure remark w/ comments +* ⚠️ [`remark-comments` + ](https://github.com/zestedesavoir/zmarkdown/tree/HEAD/packages/remark-comments#readme) + β€” new syntax to ignore things +* ⚠️ [`remark-container` + ](https://github.com/zWingz/remark-container) + β€” new syntax for containers + (πŸ‘‰ **note**: [`remark-directive`][d] is similar and up to date) +* ⚠️ [`remark-containers` + ](https://github.com/Nevenall/remark-containers) + β€” new syntax for containers + (πŸ‘‰ **note**: [`remark-directive`][d] is similar and up to date) +* 🟒 [`remark-contributors` + ](https://github.com/remarkjs/remark-contributors) + β€” add a table of contributors +* 🟒 [`remark-copy-linked-files` + ](https://github.com/sergioramos/remark-copy-linked-files) + β€” find and copy files linked files to a destination directory +* ⚠️ [`remark-custom-blocks` + ](https://github.com/zestedesavoir/zmarkdown/tree/HEAD/packages/remark-custom-blocks#readme) + β€” new syntax for custom blocks (new node types, rehype compatible) + (πŸ‘‰ **note**: [`remark-directive`][d] is similar and up to date) +* 🟒 [`remark-definition-list` + ](https://github.com/wataru-chocola/remark-definition-list) + β€” support definition lists +* 🟒 [`remark-defsplit` + ](https://github.com/remarkjs/remark-defsplit) + β€” change links and images to references w/ separate definitions +* ⚠️ [`remark-disable-tokenizers` + ](https://github.com/zestedesavoir/zmarkdown/tree/HEAD/packages/remark-disable-tokenizers#readme) + β€” turn some or all remark’s tokenizers on or off +* 🟒 [`remark-directive` + ](https://github.com/remarkjs/remark-directive) + β€” new syntax for directives (generic extensions) +* 🟒 [`remark-directive-rehype` + ](https://github.com/IGassmann/remark-directive-rehype) + β€” turn [directives][d] into HTML custom elements (rehype compatible) +* 🟒 [`remark-docx` + ](https://github.com/inokawa/remark-docx) + β€” compile markdown to docx +* 🟒 [`remark-dropcap` + ](https://github.com/brev/remark-dropcap) + β€” fancy and accessible drop caps +* 🟒 [`remark-embed-images` + ](https://github.com/remarkjs/remark-embed-images) + β€” embed local images as base64-encoded data URIs +* 🟒 [`remark-emoji` + ](https://github.com/rhysd/remark-emoji) + β€” transform Gemoji short-codes to emoji +* 🟒 [`remark-extended-table` + ](https://github.com/wataru-chocola/remark-extended-table) + β€” extended table syntax allowing colspan / rowspan +* 🟒 [`remark-extract-frontmatter` + ](https://github.com/mrzmmr/remark-extract-frontmatter) + β€” store front matter in vfiles +* 🟒 [`remark-first-heading` + ](https://github.com/laat/remark-first-heading) + β€” change the first heading in a document +* 🟒 [`remark-fix-guillemets` + ](https://github.com/zestedesavoir/zmarkdown/tree/HEAD/packages/remark-fix-guillemets#readme) + β€” support ASCII guillements (`<<`, `>>`) mapping them to HTML +* 🟒 [`remark-flexible-code-titles` + ](https://github.com/ipikuka/remark-flexible-code-titles) + β€” add titles or/and containers for code blocks with customizable attributes +* 🟒 [`remark-flexible-containers` + ](https://github.com/ipikuka/remark-flexible-containers) + β€” add custom/flexible containers with customizable properties +* 🟒 [`remark-flexible-markers` + ](https://github.com/ipikuka/remark-flexible-markers) + β€” add custom/flexible mark element with customizable properties +* 🟒 [`remark-flexible-paragraphs` + ](https://github.com/ipikuka/remark-flexible-paragraphs) + β€” add custom/flexible paragraphs with customizable properties +* 🟒 [`remark-frontmatter` + ](https://github.com/remarkjs/remark-frontmatter) + – support frontmatter (yaml, toml, and more) +* 🟒 [`remark-gemoji` + ](https://github.com/remarkjs/remark-gemoji) + β€” better support for Gemoji shortcodes +* ⚠️ [`remark-generic-extensions` + ](https://github.com/medfreeman/remark-generic-extensions) + β€” new syntax for the CommonMark generic directive extension + (πŸ‘‰ **note**: [`remark-directive`][d] is similar and up to date) +* 🟒 [`remark-gfm` + ](https://github.com/remarkjs/remark-gfm) + β€” support GFM (autolink literals, footnotes, strikethrough, tables, + tasklists) +* 🟒 [`remark-git-contributors` + ](https://github.com/remarkjs/remark-git-contributors) + β€” add a table of contributors based on Git history, options, and more +* 🟒 [`remark-github` + ](https://github.com/remarkjs/remark-github) + β€” autolink references to commits, issues, pull-requests, and users +* 🟒 [`remark-github-admonitions-to-directives` + ](https://github.com/incentro-dc/remark-github-admonitions-to-directives) + β€” convert GitHub’s blockquote-based admonitions syntax to directives syntax +* 🟒 [`remark-github-beta-blockquote-admonitions` + ](https://github.com/myl7/remark-github-beta-blockquote-admonitions) + β€” [GitHub beta blockquote-based admonitions](https://github.com/github/feedback/discussions/16925) +* 🟒 [`remark-github-blockquote-alert` + ](https://github.com/jaywcjlove/remark-github-blockquote-alert) + β€” remark plugin to add support for [GitHub Alert](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts) +* ⚠️ [`remark-grid-tables` + ](https://github.com/zestedesavoir/zmarkdown/tree/HEAD/packages/remark-grid-tables#readme) + β€” new syntax to describe tables (rehype compatible) +* 🟒 [`remark-heading-id` + ](https://github.com/imcuttle/remark-heading-id) + β€” custom heading id support `{#custom-id}` +* 🟒 [`remark-heading-gap` + ](https://github.com/remarkjs/remark-heading-gap) + β€” serialize w/ more blank lines between headings +* 🟒 [`@vcarl/remark-headings` + ](https://github.com/vcarl/remark-headings) + β€” extract a list of headings as data +* 🟒 [`remark-hexo` + ](https://github.com/bennycode/remark-hexo) + β€” renders [Hexo tags](https://hexo.io/docs/tag-plugins) +* 🟒 [`remark-highlight.js` + ](https://github.com/remarkjs/remark-highlight.js) + β€” highlight code blocks w/ + [`highlight.js`](https://github.com/isagalaev/highlight.js) + (rehype compatible) +* 🟒 [`remark-hint` + ](https://github.com/sergioramos/remark-hint) + β€” add hints/tips/warnings to markdown +* 🟒 [`remark-html` + ](https://github.com/remarkjs/remark-html) + β€” serialize markdown as HTML +* ⚠️ [`remark-iframes` + ](https://github.com/zestedesavoir/zmarkdown/tree/HEAD/packages/remark-iframes#readme) + β€” new syntax to create iframes (new node type, rehype compatible) +* 🟒 [`remark-ignore` + ](https://github.com/Xunnamius/unified-utils/blob/main/packages/remark-ignore) + β€” use comments to exclude nodes from transformation +* 🟒 [`remark-images` + ](https://github.com/remarkjs/remark-images) + β€” add an improved image syntax +* 🟒 [`remark-img-links` + ](https://github.com/Pondorasti/remark-img-links) + β€” prefix relative image paths with an absolute URL +* 🟒 [`remark-inline-links` + ](https://github.com/remarkjs/remark-inline-links) + β€” change references and definitions to links and images +* 🟒 [`remark-ins` + ](https://github.com/ipikuka/remark-ins) + β€” add ins element for inserted texts opposite to deleted texts +* 🟒 [`remark-join-cjk-lines` + ](https://github.com/purefun/remark-join-cjk-lines) + β€” remove extra space between CJK Characters. +* ⚠️ [`remark-kbd` + ](https://github.com/zestedesavoir/zmarkdown/tree/HEAD/packages/remark-kbd#readme) + β€” new syntax for keyboard keys (new node type, rehype compatible) +* ⚠️ [`remark-kbd-plus` + ](https://github.com/twardoch/remark-kbd-plus) + β€” new syntax for keyboard keys w/ plusses (new node type, rehype + compatible) +* 🟒 [`remark-license` + ](https://github.com/remarkjs/remark-license) + β€” add a license section +* 🟒 [`remark-link-rewrite` + ](https://github.com/rjanjic/remark-link-rewrite) + β€” customize link URLs dynamically +* 🟒 [`remark-linkify-regex` + ](https://gitlab.com/staltz/remark-linkify-regex) + β€” change text matching a regex to links +* 🟒 [`remark-lint` + ](https://github.com/remarkjs/remark-lint) + β€” check markdown code style +* 🟒 [`remark-macro` + ](https://github.com/dimerapp/remark-macro) + β€” support for block macros (new node types, rehype compatible) +* 🟒 [`remark-man` + ](https://github.com/remarkjs/remark-man) + β€” serialize markdown as man pages (roff) +* 🟒 [`remark-math` + ](https://github.com/remarkjs/remark-math) + β€” new syntax for math (new node types, rehype compatible) +* 🟒 [`remark-mdx` + ](https://github.com/mdx-js/mdx/tree/main/packages/remark-mdx) + β€” support MDX (JSX, expressions, ESM) +* 🟒 [`remark-mentions` + ](https://github.com/FinnRG/remark-mentions) + β€” replace @ mentions with links +* 🟒 [`remark-mermaidjs` + ](https://github.com/remcohaszing/remark-mermaidjs) + β€” transform mermaid code blocks into inline SVGs +* 🟒 [`remark-message-control` + ](https://github.com/remarkjs/remark-message-control) + β€” turn some or all messages on or off +* 🟒 [`remark-normalize-headings` + ](https://github.com/remarkjs/remark-normalize-headings) + β€” make sure at most one top-level heading exists +* 🟒 [`remark-numbered-footnote-labels` + ](https://github.com/jackfletch/remark-numbered-footnote-labels) + β€” label footnotes w/ numbers +* 🟒 [`@agentofuser/remark-oembed` + ](https://github.com/agentofuser/remark-oembed) + β€” transform URLs for youtube, twitter, etc. embeds +* 🟒 [`remark-oembed` + ](https://github.com/sergioramos/remark-oembed) + β€” transform URLs surrounded by newlines into *asynchronously* loading + embeds +* 🟒 [`remark-package-dependencies` + ](https://github.com/unlight/remark-package-dependencies) + β€” inject your dependencies +* ⚠️ [`remark-parse-yaml` + ](https://github.com/landakram/remark-parse-yaml) + β€” parse YAML nodes and expose their value as `parsedValue` +* 🟒 [`remark-pdf` + ](https://github.com/inokawa/remark-pdf) + β€” compile markdown to pdf +* ⚠️ [`remark-ping` + ](https://github.com/zestedesavoir/zmarkdown/tree/HEAD/packages/remark-ping#readme) + β€” new syntax for mentions w/ configurable existence check (new node + type, rehype compatible) +* 🟒 [`remark-prettier` + ](https://github.com/remcohaszing/remark-prettier) + β€” check and format markdown using Prettier +* 🟒 [`remark-prism` + ](https://github.com/sergioramos/remark-prism) + β€” highlight code blocks w/ [Prism](https://prismjs.com/) (supporting most + Prism plugins) +* ⚠️ [`remark-redact` + ](https://github.com/seafoam6/remark-redact) + β€” new syntax to conceal text matching a regex +* 🟒 [`remark-redactable` + ](https://github.com/code-dot-org/remark-redactable) + β€” write plugins to redact content from a markdown document, + then restore it later +* 🟒 [`remark-reference-links` + ](https://github.com/remarkjs/remark-reference-links) + β€” transform links and images into references and definitions +* 🟒 [`remark-rehype` + ](https://github.com/remarkjs/remark-rehype) + β€” transform to [rehype](https://github.com/rehypejs/rehype) +* 🟒 [`remark-relative-links` + ](https://github.com/zslabs/remark-relative-links) + β€” change absolute URLs to relative ones +* 🟒 [`remark-remove-comments` + ](https://github.com/alvinometric/remark-remove-comments) + β€” remove HTML comments from the processed output +* 🟒 [`remark-remove-unused-definitions` + ](https://github.com/Xunnamius/unified-utils/blob/main/packages/remark-remove-unused-definitions) + β€” remove unused reference-style link definitions +* 🟒 [`remark-remove-url-trailing-slash` + ](https://github.com/Xunnamius/unified-utils/blob/main/packages/remark-remove-url-trailing-slash) + β€” remove trailing slashes from the ends of all URL paths +* 🟒 [`remark-renumber-references` + ](https://github.com/Xunnamius/unified-utils/blob/main/packages/remark-renumber-references) + β€” renumber numeric reference-style link ids contiguously starting from 1 +* 🟒 [`remark-retext` + ](https://github.com/remarkjs/remark-retext) + β€” transform to [retext](https://github.com/retextjs/retext) +* 🟒 [`remark-ruby` + ](https://github.com/laysent/remark-ruby) + β€” new syntax for ruby (furigana) +* 🟒 [`remark-sectionize` + ](https://github.com/jake-low/remark-sectionize) + β€” wrap headings and subsequent content in section tags (new node type, + rehype compatible) +* ⚠️ [`remark-shortcodes` + ](https://github.com/djm/remark-shortcodes) + β€” new syntax for Wordpress- and Hugo-like shortcodes (new node type) + (πŸ‘‰ **note**: [`remark-directive`][d] is similar and up to date) +* 🟒 [`remark-simple-plantuml` + ](https://github.com/akebifiky/remark-simple-plantuml) + β€” turn PlantUML code blocks to images +* 🟒 [`remark-slate` + ](https://github.com/hanford/remark-slate) + β€” compile markdown to [Slate nodes](https://docs.slatejs.org/concepts/02-nodes) +* 🟒 [`remark-slate-transformer` + ](https://github.com/inokawa/remark-slate-transformer) + β€” compile markdown to + [Slate nodes](https://docs.slatejs.org/concepts/02-nodes) + and Slate nodes to markdown +* 🟒 [`remark-smartypants` + ](https://github.com/silvenon/remark-smartypants) + β€” SmartyPants +* 🟒 [`remark-smcat` + ](https://github.com/shedali/remark-smcat) + β€” state machine cat +* 🟒 [`remark-sort-definitions` + ](https://github.com/Xunnamius/unified-utils/blob/main/packages/remark-sort-definitions) + β€” reorder reference-style link definitions +* 🟒 [`remark-sources` + ](https://github.com/unlight/remark-sources) + β€” insert source code +* 🟒 [`remark-strip-badges` + ](https://github.com/remarkjs/remark-strip-badges) + β€” remove badges (such as `shields.io`) +* 🟒 [`remark-strip-html` + ](https://github.com/craftzdog/remark-strip-html) + β€” remove HTML +* 🟒 [`remark-squeeze-paragraphs` + ](https://github.com/remarkjs/remark-squeeze-paragraphs) + β€” remove empty paragraphs +* ⚠️ [`remark-sub-super` + ](https://github.com/zestedesavoir/zmarkdown/tree/HEAD/packages/remark-sub-super) + β€” new syntax for super- and subscript (new node types, rehype + compatible) +* ⚠️ [`remark-terms` + ](https://github.com/Nevenall/remark-terms) + β€” new customizable syntax for special terms and phrases +* 🟒 [`remark-textr` + ](https://github.com/remarkjs/remark-textr) + β€” transform text w/ [`Textr` + ](https://github.com/shuvalov-anton/textr) +* 🟒 [`remark-tight-comments` + ](https://github.com/Xunnamius/unified-utils/blob/main/packages/remark-tight-comments) + β€” selectively remove newlines around comments +* 🟒 [`remark-title` + ](https://github.com/RichardLitt/remark-title) + β€” check and add the document title +* 🟒 [`remark-toc` + ](https://github.com/remarkjs/remark-toc) + β€” add a table of contents +* 🟒 [`remark-torchlight` + ](https://github.com/torchlight-api/remark-torchlight) + β€” syntax highlighting powered by [torchlight.dev](https://torchlight.dev) +* 🟒 [`remark-tree-sitter` + ](https://github.com/samlanning/remark-tree-sitter) + β€” highlight code blocks in markdown files using + [Tree-sitter](https://tree-sitter.github.io/tree-sitter/) + (rehype compatible) +* 🟒 [`remark-truncate-links` + ](https://github.com/GaiAma/Coding4GaiAma/tree/HEAD/packages/remark-truncate-links) + β€” truncate/shorten urls not manually named +* 🟒 [`remark-twemoji` + ](https://github.com/madiodio/remark-twemoji) + β€” turn emoji into [Twemoji](https://github.com/twitter/twemoji) +* 🟒 [`remark-typedoc-symbol-links` + ](https://github.com/kamranayub/remark-typedoc-symbol-links) + β€” turn Typedoc symbol link expressions into markdown links +* 🟒 [`remark-typescript` + ](https://github.com/trevorblades/remark-typescript) + β€” turn TypeScript code to JavaScript +* 🟒 [`remark-typograf` + ](https://github.com/mavrin/remark-typograf) + β€” transform text w/ [Typograf](https://github.com/typograf) +* 🟒 [`remark-unlink` + ](https://github.com/remarkjs/remark-unlink) + β€” remove all links, references, and definitions +* 🟒 [`remark-unwrap-images` + ](https://github.com/remarkjs/remark-unwrap-images) + β€” remove the wrapping paragraph for images +* 🟒 [`remark-usage` + ](https://github.com/remarkjs/remark-usage) + β€” add a usage example +* 🟒 [`remark-utf8` + ](https://github.com/Swizec/remark-utf8) + β€” turn bolds, italics, and code into UTF 8 special characters +* 🟒 [`remark-validate-links` + ](https://github.com/remarkjs/remark-validate-links) + β€” check links to headings and files +* ⚠️ [`remark-variables` + ](https://github.com/mrzmmr/remark-variables) + β€” new syntax for variables +* 🟒 [`remark-vdom` + ](https://github.com/remarkjs/remark-vdom) + β€” compile markdown to [VDOM](https://github.com/Matt-Esch/virtual-dom/) +* 🟒 [`remark-wiki-link` + ](https://github.com/landakram/remark-wiki-link) + β€” new syntax for wiki links (rehype compatible) +* 🟒 [`remark-yaml-config` + ](https://github.com/remarkjs/remark-yaml-config) + β€” configure remark w/ YAML ## List of presets diff --git a/package.json b/package.json index 2cf5e7ca..f4f47b35 100644 --- a/package.json +++ b/package.json @@ -19,23 +19,20 @@ "devDependencies": { "@types/mdast": "^4.0.0", "@types/node": "^20.0.0", - "c8": "^8.0.0", + "c8": "^9.0.0", "mdast-util-gfm": "^3.0.0", "micromark-extension-gfm": "^3.0.0", "prettier": "^3.0.0", - "remark-preset-wooorm": "^9.0.0", + "remark-preset-wooorm": "^10.0.0", "type-coverage": "^2.0.0", "typescript": "^5.0.0", "unified": "^11.0.0", "unist-util-remove-position": "^5.0.0", - "vfile": "^6.0.0", - "xo": "^0.56.0" + "xo": "^0.58.0" }, - "#": "to do: remove `vfile` above when dust settles, it’s not needed, other that for TS build bugs currently", "scripts": { - "#": "./packages/remark-cli/cli.js . --frail --output --quiet", "build": "tsc --build --clean && tsc --build && type-coverage", - "format": "prettier . --log-level warn --write && xo --fix", + "format": "./packages/remark-cli/cli.js . --frail --output --quiet && prettier . --log-level warn --write && xo --fix", "prepack": "npm run build && npm run format", "test": "npm run build && npm run format && npm run test-coverage", "test-api": "node --conditions development test.js", diff --git a/packages/remark-cli/cli.js b/packages/remark-cli/cli.js index ac66289e..d3d0c82e 100755 --- a/packages/remark-cli/cli.js +++ b/packages/remark-cli/cli.js @@ -14,7 +14,7 @@ import {remark} from 'remark' import {args} from 'unified-args' /** @type {Pack} */ -const proc = JSON.parse( +const process_ = JSON.parse( String( await fs.readFile( new URL('package.json', resolve('remark', import.meta.url)) @@ -30,14 +30,14 @@ const cli = JSON.parse( args({ description: cli.description, extensions: markdownExtensions, - ignoreName: '.' + proc.name + 'ignore', - name: proc.name, - packageField: proc.name + 'Config', - pluginPrefix: proc.name, + ignoreName: '.' + process_.name + 'ignore', + name: process_.name, + packageField: process_.name + 'Config', + pluginPrefix: process_.name, processor: remark, - rcName: '.' + proc.name + 'rc', + rcName: '.' + process_.name + 'rc', version: [ - proc.name + ': ' + proc.version, + process_.name + ': ' + process_.version, cli.name + ': ' + cli.version ].join(', ') }) diff --git a/packages/remark-cli/readme.md b/packages/remark-cli/readme.md index 112c337d..61f369be 100644 --- a/packages/remark-cli/readme.md +++ b/packages/remark-cli/readme.md @@ -11,19 +11,19 @@ Command line interface to inspect and change markdown files with **[remark][]**. ## Contents -* [What is this?](#what-is-this) -* [When should I use this?](#when-should-i-use-this) -* [Install](#install) -* [Use](#use) -* [CLI](#cli) -* [Examples](#examples) - * [Example: checking and formatting markdown on the CLI](#example-checking-and-formatting-markdown-on-the-cli) - * [Example: config files (JSON, YAML, JS)](#example-config-files-json-yaml-js) -* [Compatibility](#compatibility) -* [Security](#security) -* [Contribute](#contribute) -* [Sponsor](#sponsor) -* [License](#license) +* [What is this?](#what-is-this) +* [When should I use this?](#when-should-i-use-this) +* [Install](#install) +* [Use](#use) +* [CLI](#cli) +* [Examples](#examples) + * [Example: checking and formatting markdown on the CLI](#example-checking-and-formatting-markdown-on-the-cli) + * [Example: config files (JSON, YAML, JS)](#example-config-files-json-yaml-js) +* [Compatibility](#compatibility) +* [Security](#security) +* [Contribute](#contribute) +* [Sponsor](#sponsor) +* [License](#license) ## What is this? @@ -122,14 +122,14 @@ More info on all these options is available at [`unified-args`][unified-args], which does the work. `remark-cli` is `unified-args` preconfigured to: -* load `remark-` plugins -* search for markdown extensions - ([`.md`, `.markdown`, etc][markdown-extensions]) -* ignore paths found in [`.remarkignore` files][ignore-file] -* load configuration from - [`.remarkrc`, `.remarkrc.js`, etc files][config-file] -* use configuration from - [`remarkConfig` fields in `package.json` files][config-file] +* load `remark-` plugins +* search for markdown extensions + ([`.md`, `.markdown`, etc][markdown-extensions]) +* ignore paths found in [`.remarkignore` files][ignore-file] +* load configuration from + [`.remarkrc`, `.remarkrc.js`, etc files][config-file] +* use configuration from + [`remarkConfig` fields in `package.json` files][config-file] ## Examples @@ -268,14 +268,14 @@ The order of precedence is as follows. Earlier wins (so in the above file structure `folder/.remarkrc.js` wins over `folder/package.json`): -1. `.remarkrc` (JSON) -3. `.remarkrc.cjs` (CJS) -5. `.remarkrc.js` (CJS or ESM, depending on `type: 'module'` in `package.json`) -2. `.remarkrc.json` (JSON) -4. `.remarkrc.mjs` (ESM) -6. `.remarkrc.yaml` (YAML) -7. `.remarkrc.yml` (YAML) -8. `package.json` with `remarkConfig` field +1. `.remarkrc` (JSON) +2. `.remarkrc.cjs` (CJS) +3. `.remarkrc.js` (CJS or ESM, depending on `type: 'module'` in `package.json`) +4. `.remarkrc.json` (JSON) +5. `.remarkrc.mjs` (ESM) +6. `.remarkrc.yaml` (YAML) +7. `.remarkrc.yml` (YAML) +8. `package.json` with `remarkConfig` field ## Compatibility diff --git a/packages/remark-parse/lib/index.js b/packages/remark-parse/lib/index.js index f4edbf33..08f3b16b 100644 --- a/packages/remark-parse/lib/index.js +++ b/packages/remark-parse/lib/index.js @@ -29,8 +29,8 @@ export default function remarkParse(options) { /** * @type {Parser} */ - function parser(doc) { - return fromMarkdown(doc, { + function parser(document) { + return fromMarkdown(document, { ...self.data('settings'), ...options, // Note: these options are not in the readme. diff --git a/packages/remark-parse/readme.md b/packages/remark-parse/readme.md index b0977ab5..b2afb945 100644 --- a/packages/remark-parse/readme.md +++ b/packages/remark-parse/readme.md @@ -12,23 +12,23 @@ ## Contents -* [What is this?](#what-is-this) -* [When should I use this?](#when-should-i-use-this) -* [Install](#install) -* [Use](#use) -* [API](#api) - * [`unified().use(remarkParse)`](#unifieduseremarkparse) -* [Examples](#examples) - * [Example: support GFM and frontmatter](#example-support-gfm-and-frontmatter) - * [Example: turning markdown into a man page](#example-turning-markdown-into-a-man-page) -* [Syntax](#syntax) -* [Syntax tree](#syntax-tree) -* [Types](#types) -* [Compatibility](#compatibility) -* [Security](#security) -* [Contribute](#contribute) -* [Sponsor](#sponsor) -* [License](#license) +* [What is this?](#what-is-this) +* [When should I use this?](#when-should-i-use-this) +* [Install](#install) +* [Use](#use) +* [API](#api) + * [`unified().use(remarkParse)`](#unifieduseremarkparse) +* [Examples](#examples) + * [Example: support GFM and frontmatter](#example-support-gfm-and-frontmatter) + * [Example: turning markdown into a man page](#example-turning-markdown-into-a-man-page) +* [Syntax](#syntax) +* [Syntax tree](#syntax-tree) +* [Types](#types) +* [Compatibility](#compatibility) +* [Security](#security) +* [Contribute](#contribute) +* [Sponsor](#sponsor) +* [License](#license) ## What is this? diff --git a/packages/remark-stringify/readme.md b/packages/remark-stringify/readme.md index fee71da4..4e4df258 100644 --- a/packages/remark-stringify/readme.md +++ b/packages/remark-stringify/readme.md @@ -12,19 +12,21 @@ ## Contents -* [What is this?](#what-is-this) -* [When should I use this?](#when-should-i-use-this) -* [Install](#install) -* [Use](#use) -* [API](#api) - * [`unified().use(remarkStringify[, options])`](#unifieduseremarkstringify-options) -* [Syntax](#syntax) -* [Syntax tree](#syntax-tree) -* [Types](#types) -* [Security](#security) -* [Contribute](#contribute) -* [Sponsor](#sponsor) -* [License](#license) +* [What is this?](#what-is-this) +* [When should I use this?](#when-should-i-use-this) +* [Install](#install) +* [Use](#use) +* [API](#api) + * [`unified().use(remarkStringify[, options])`](#unifieduseremarkstringify-options) + * [`Options`](#options) +* [Syntax](#syntax) +* [Syntax tree](#syntax-tree) +* [Types](#types) +* [Compatibility](#compatibility) +* [Security](#security) +* [Contribute](#contribute) +* [Sponsor](#sponsor) +* [License](#license) ## What is this? @@ -125,8 +127,8 @@ Add support for serializing to markdown. ###### Parameters -* `options` ([`Options`][api-options], optional) - β€” configuration +* `options` ([`Options`][api-options], optional) + β€” configuration ###### Returns @@ -138,60 +140,60 @@ Configuration (TypeScript type). ###### Fields -* `bullet` (`'*'`, `'+'`, or `'-'`, default: `'*'`) - β€” marker to use for bullets of items in unordered lists -* `bulletOther` (`'*'`, `'+'`, or `'-'`, default: `'-'` when `bullet` is - `'*'`, `'*'` otherwise) - β€” marker to use in certain cases where the primary bullet doesn’t work; - cannot be equal to `bullet` -* `bulletOrdered` (`'.'` or `')'`, default: `'.'`) - β€” marker to use for bullets of items in ordered lists -* `closeAtx` (`boolean`, default: `false`) - β€” add the same number of number signs (`#`) at the end of an ATX heading as - the opening sequence -* `emphasis` (`'*'` or `'_'`, default: `'*'`) - β€” marker to use for emphasis -* `fence` (``'`'`` or `'~'`, default: ``'`'``) - β€” marker to use for fenced code -* `fences` (`boolean`, default: `true`) - β€” use fenced code always; when `false`, uses fenced code if there is a - language defined, if the code is empty, or if it starts or ends in blank - lines -* `handlers` (`Handlers`, optional) - β€” handle particular nodes; - see [`mdast-util-to-markdown`][mdast-util-to-markdown] for more info -* `incrementListMarker` (`boolean`, default: `true`) - β€” increment the counter of ordered lists items -* `join` (`Array`, optional) - β€” how to join blocks; - see [`mdast-util-to-markdown`][mdast-util-to-markdown] for more info -* `listItemIndent` (`'mixed'`, `'one'`, or `'tab'`, default: `'one'`) - β€” how to indent the content of list items; - either with the size of the bullet plus one space (when `'one'`), a tab - stop (`'tab'`), or depending on the item and its parent list: `'mixed'` - uses `'one'` if the item and list are tight and `'tab'` otherwise -* `quote` (`'"'` or `"'"`, default: `'"'`) - β€” marker to use for titles -* `resourceLink` (`boolean`, default: `false`) - β€” always use resource links (`[text](url)`); - when `false`, uses autolinks (``) when possible -* `rule` (`'*'`, `'-'`, or `'_'`, default: `'*'`) - β€” marker to use for thematic breaks -* `ruleRepetition` (`number`, default: `3`, min: `3`) - β€” number of markers to use for thematic breaks -* `ruleSpaces` (`boolean`, default: `false`) - β€” add spaces between markers in thematic breaks -* `setext` (`boolean`, default: `false`) - β€” use setext headings when possible; - when `true`, uses setext headings (`heading\n=======`) for non-empty rank 1 - or 2 headings -* `strong` (`'*'` or `'_'`, default: `'*'`) - β€” marker to use for strong -* `tightDefinitions` (`boolean`, default: `false`) - β€” join definitions without a blank line -* `unsafe` (`Array`, optional) - β€” schemas that define when characters cannot occur; - see [`mdast-util-to-markdown`][mdast-util-to-markdown] for more info +* `bullet` (`'*'`, `'+'`, or `'-'`, default: `'*'`) + β€” marker to use for bullets of items in unordered lists +* `bulletOther` (`'*'`, `'+'`, or `'-'`, default: `'-'` when `bullet` is + `'*'`, `'*'` otherwise) + β€” marker to use in certain cases where the primary bullet doesn’t work; + cannot be equal to `bullet` +* `bulletOrdered` (`'.'` or `')'`, default: `'.'`) + β€” marker to use for bullets of items in ordered lists +* `closeAtx` (`boolean`, default: `false`) + β€” add the same number of number signs (`#`) at the end of an ATX heading as + the opening sequence +* `emphasis` (`'*'` or `'_'`, default: `'*'`) + β€” marker to use for emphasis +* `fence` (``'`'`` or `'~'`, default: ``'`'``) + β€” marker to use for fenced code +* `fences` (`boolean`, default: `true`) + β€” use fenced code always; when `false`, uses fenced code if there is a + language defined, if the code is empty, or if it starts or ends in blank + lines +* `handlers` (`Handlers`, optional) + β€” handle particular nodes; + see [`mdast-util-to-markdown`][mdast-util-to-markdown] for more info +* `incrementListMarker` (`boolean`, default: `true`) + β€” increment the counter of ordered lists items +* `join` (`Array`, optional) + β€” how to join blocks; + see [`mdast-util-to-markdown`][mdast-util-to-markdown] for more info +* `listItemIndent` (`'mixed'`, `'one'`, or `'tab'`, default: `'one'`) + β€” how to indent the content of list items; + either with the size of the bullet plus one space (when `'one'`), a tab + stop (`'tab'`), or depending on the item and its parent list: `'mixed'` + uses `'one'` if the item and list are tight and `'tab'` otherwise +* `quote` (`'"'` or `"'"`, default: `'"'`) + β€” marker to use for titles +* `resourceLink` (`boolean`, default: `false`) + β€” always use resource links (`[text](url)`); + when `false`, uses autolinks (``) when possible +* `rule` (`'*'`, `'-'`, or `'_'`, default: `'*'`) + β€” marker to use for thematic breaks +* `ruleRepetition` (`number`, default: `3`, min: `3`) + β€” number of markers to use for thematic breaks +* `ruleSpaces` (`boolean`, default: `false`) + β€” add spaces between markers in thematic breaks +* `setext` (`boolean`, default: `false`) + β€” use setext headings when possible; + when `true`, uses setext headings (`heading\n=======`) for non-empty rank 1 + or 2 headings +* `strong` (`'*'` or `'_'`, default: `'*'`) + β€” marker to use for strong +* `tightDefinitions` (`boolean`, default: `false`) + β€” join definitions without a blank line +* `unsafe` (`Array`, optional) + β€” schemas that define when characters cannot occur; + see [`mdast-util-to-markdown`][mdast-util-to-markdown] for more info diff --git a/packages/remark/readme.md b/packages/remark/readme.md index 649053ae..d80f3dad 100644 --- a/packages/remark/readme.md +++ b/packages/remark/readme.md @@ -13,23 +13,23 @@ serializing to markdown. ## Contents -* [What is this?](#what-is-this) -* [When should I use this?](#when-should-i-use-this) -* [Install](#install) -* [Use](#use) -* [API](#api) - * [`remark()`](#remark-1) -* [Examples](#examples) - * [Example: checking markdown](#example-checking-markdown) - * [Example: passing options to `remark-stringify`](#example-passing-options-to-remark-stringify) -* [Syntax](#syntax) -* [Syntax tree](#syntax-tree) -* [Types](#types) -* [Compatibility](#compatibility) -* [Security](#security) -* [Contribute](#contribute) -* [Sponsor](#sponsor) -* [License](#license) +* [What is this?](#what-is-this) +* [When should I use this?](#when-should-i-use-this) +* [Install](#install) +* [Use](#use) +* [API](#api) + * [`remark()`](#remark-1) +* [Examples](#examples) + * [Example: checking markdown](#example-checking-markdown) + * [Example: passing options to `remark-stringify`](#example-passing-options-to-remark-stringify) +* [Syntax](#syntax) +* [Syntax tree](#syntax-tree) +* [Types](#types) +* [Compatibility](#compatibility) +* [Security](#security) +* [Contribute](#contribute) +* [Sponsor](#sponsor) +* [License](#license) ## What is this? diff --git a/readme.md b/readme.md index 53ead683..5243826b 100644 --- a/readme.md +++ b/readme.md @@ -14,14 +14,14 @@ You can use remark on the server, the client, CLIs, deno, etc. ## Feature highlights -* [x] **[compliant][syntax]** - β€” 100% to CommonMark, 100% to GFM or MDX with a plugin -* [x] **[ASTs][syntax-tree]** - β€” inspecting and changing content made easy -* [x] **[popular][]** - β€” world’s most popular markdown parser -* [x] **[plugins][]** - β€” 150+ plugins you can pick and choose from +* [x] **[compliant][syntax]** + β€” 100% to CommonMark, 100% to GFM or MDX with a plugin +* [x] **[ASTs][syntax-tree]** + β€” inspecting and changing content made easy +* [x] **[popular][]** + β€” world’s most popular markdown parser +* [x] **[plugins][]** + β€” 150+ plugins you can pick and choose from ## Intro @@ -32,30 +32,30 @@ We call those programs plugins. Plugins inspect and change trees. You can use the many existing plugins or you can make your own. -* to learn markdown, see this [cheatsheet and tutorial][cheat] -* for more about us, see [`unifiedjs.com`][site] -* for updates, see [Twitter][] -* for questions, see [support][] -* to help, see [contribute][] or [sponsor][] below +* to learn markdown, see this [cheatsheet and tutorial][cheat] +* for more about us, see [`unifiedjs.com`][site] +* for updates, see [Twitter][] +* for questions, see [support][] +* to help, see [contribute][] or [sponsor][] below ## Contents -* [What is this?](#what-is-this) -* [When should I use this?](#when-should-i-use-this) -* [Plugins](#plugins) -* [Examples](#examples) - * [Example: turning markdown into HTML](#example-turning-markdown-into-html) - * [Example: support for GFM and frontmatter](#example-support-for-gfm-and-frontmatter) - * [Example: checking markdown](#example-checking-markdown) - * [Example: checking and formatting markdown on the CLI](#example-checking-and-formatting-markdown-on-the-cli) -* [Syntax](#syntax) -* [Syntax tree](#syntax-tree) -* [Types](#types) -* [Compatibility](#compatibility) -* [Security](#security) -* [Contribute](#contribute) -* [Sponsor](#sponsor) -* [License](#license) +* [What is this?](#what-is-this) +* [When should I use this?](#when-should-i-use-this) +* [Plugins](#plugins) +* [Examples](#examples) + * [Example: turning markdown into HTML](#example-turning-markdown-into-html) + * [Example: support for GFM and frontmatter](#example-support-for-gfm-and-frontmatter) + * [Example: checking markdown](#example-checking-markdown) + * [Example: checking and formatting markdown on the CLI](#example-checking-and-formatting-markdown-on-the-cli) +* [Syntax](#syntax) +* [Syntax tree](#syntax-tree) +* [Types](#types) +* [Compatibility](#compatibility) +* [Security](#security) +* [Contribute](#contribute) +* [Sponsor](#sponsor) +* [License](#license) ## What is this? @@ -141,15 +141,15 @@ You can use remark for many different things. This GitHub repository is a monorepo that contains the following packages: -* [`remark-parse`][remark-parse] - β€” plugin to take markdown as input and turn it into a syntax tree (mdast) -* [`remark-stringify`][remark-stringify] - β€” plugin to take a syntax tree (mdast) and turn it into markdown as output -* [`remark`][remark-core] - β€” `unified`, `remark-parse`, and `remark-stringify`, useful when input and - output are markdown -* [`remark-cli`][remark-cli] - β€” CLI around `remark` to inspect and format markdown in scripts +* [`remark-parse`][remark-parse] + β€” plugin to take markdown as input and turn it into a syntax tree (mdast) +* [`remark-stringify`][remark-stringify] + β€” plugin to take a syntax tree (mdast) and turn it into markdown as output +* [`remark`][remark-core] + β€” `unified`, `remark-parse`, and `remark-stringify`, useful when input and + output are markdown +* [`remark-cli`][remark-cli] + β€” CLI around `remark` to inspect and format markdown in scripts ## When should I use this? @@ -173,14 +173,14 @@ use [`mdast-util-from-markdown`][mdast-util-from-markdown] and remark plugins deal with markdown. Some popular examples are: -* [`remark-gfm`][remark-gfm] - β€” add support for GFM (GitHub flavored markdown) -* [`remark-lint`][remark-lint] - β€” inspect markdown and warn about inconsistencies -* [`remark-toc`][remark-toc] - β€” generate a table of contents -* [`remark-rehype`][remark-rehype] - β€” turn markdown into HTML +* [`remark-gfm`][remark-gfm] + β€” add support for GFM (GitHub flavored markdown) +* [`remark-lint`][remark-lint] + β€” inspect markdown and warn about inconsistencies +* [`remark-toc`][remark-toc] + β€” generate a table of contents +* [`remark-rehype`][remark-rehype] + β€” turn markdown into HTML These plugins are exemplary because what they do and how they do it is quite different, respectively to extend markdown syntax, inspect trees, change trees, @@ -189,12 +189,12 @@ and transform to other syntax trees. You can choose from the 150+ plugins that already exist. Here are three good ways to find plugins: -* [`awesome-remark`][awesome-remark] - β€” selection of the most awesome projects -* [List of plugins][list-of-plugins] - β€” list of all plugins -* [`remark-plugin` topic][topic] - β€” any tagged repo on GitHub +* [`awesome-remark`][awesome-remark] + β€” selection of the most awesome projects +* [List of plugins][list-of-plugins] + β€” list of all plugins +* [`remark-plugin` topic][topic] + β€” any tagged repo on GitHub Some plugins are maintained by us here in the `@remarkjs` organization while others are maintained by folks elsewhere. @@ -628,8 +628,6 @@ Support this effort and give back by sponsoring on [OpenCollective][collective]! [remark-gfm]: https://github.com/remarkjs/remark-gfm -[remark-html]: https://github.com/remarkjs/remark-html - [remark-lint]: https://github.com/remarkjs/remark-lint [remark-parse]: packages/remark-parse/ diff --git a/test.js b/test.js index d403ea20..7f3d0b63 100644 --- a/test.js +++ b/test.js @@ -1,5 +1,5 @@ import assert from 'node:assert/strict' -import {exec as execCb} from 'node:child_process' +import {exec as execCallback} from 'node:child_process' import test from 'node:test' import {promisify} from 'node:util' import {fileURLToPath} from 'node:url' @@ -11,7 +11,7 @@ import remarkStringify from 'remark-stringify' import {unified} from 'unified' import {removePosition} from 'unist-util-remove-position' -const exec = promisify(execCb) +const exec = promisify(execCallback) test('remark', async function (t) { await t.test('should expose the public api', async function () { @@ -34,12 +34,12 @@ test('remark', async function (t) { }) test('remark-cli', async function (t) { - const bin = fileURLToPath( + const binary = fileURLToPath( new URL('packages/remark-cli/cli.js', import.meta.url) ) await t.test('should show help on `--help`', async function () { - const result = await exec(bin + ' --help') + const result = await exec(binary + ' --help') assert.equal( result.stdout, @@ -93,7 +93,7 @@ test('remark-cli', async function (t) { }) await t.test('should show version on `--version`', async function () { - const result = await exec(bin + ' --version') + const result = await exec(binary + ' --version') assert.match(result.stdout, /remark: \d+\.\d+\.\d+/) assert.match(result.stdout, /remark-cli: \d+\.\d+\.\d+/)