A markdown processor powered by plugins that transforms markdown using abstract syntax trees (ASTs).
Remark is a markdown processor that transforms markdown content using a plugin-based architecture. It parses markdown into an abstract syntax tree (AST), allows plugins to manipulate that tree, and then serializes it back to markdown or other formats like HTML. It solves the problem of programmatically working with markdown in a structured and extensible way.
Developers who need to programmatically process, transform, lint, or analyze markdown content in JavaScript/TypeScript projects, particularly those building documentation tools, static site generators, or content pipelines.
Developers choose Remark for its extensive plugin ecosystem, standards compliance, and AST-based approach that provides fine-grained control over markdown processing. Its integration with the unified collective ensures consistency and interoperability with other text processing tools.
markdown processor powered by plugins part of the @unifiedjs collective
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Over 150 plugins are available for tasks like linting, GFM support, and table of contents generation, providing flexibility for diverse use cases as listed in the README.
Uses mdast to parse markdown into an abstract syntax tree, enabling detailed inspection and manipulation, as demonstrated in the syntax tree examples for custom transformations.
100% compliant with CommonMark by default, with plugins to add GFM, MDX, and other extensions, ensuring compatibility while allowing customization.
Works on server, client, CLI, Deno, and other JavaScript environments, making it versatile for different project setups, as highlighted in the feature list.
Fully typed with detailed TypeScript definitions, aiding in development and reducing errors, with examples provided for typing custom plugins.
Setting up a remark pipeline requires selecting and configuring multiple plugins, which can be daunting for simple tasks, as implied in the 'When should I use this?' section that recommends simpler tools for basic needs.
The AST-based processing adds overhead compared to lighter parsers like micromark, making it less efficient for straightforward markdown rendering, a trade-off acknowledged in the README.
With many plugins maintained by different authors, some may have inconsistent quality or security risks, requiring careful evaluation as noted in the Plugins section.
When converting to HTML, extra plugins like rehype-sanitize are needed to prevent XSS attacks, adding to setup complexity and maintenance, as warned in the Security section.