Mdex

screenshot of Mdex

Fast and Extensible Markdown for Elixir. Compliant with CommonMark spec. Formats to HTML, JSON, and XML. Built on top of comrak, ammonia, and autumnus.

Overview

MDEx is an innovative library designed for developers looking to parse Markdown files with speed and efficiency. Built upon strong foundations like comrak and ammonia, it complies with the CommonMark specification and extends capabilities to manage a variety of document formats effortlessly. Its main goal is to provide a fast, extensible solution for parsing large quantities of CommonMark documents, thereby addressing the limitations found in other parsing libraries.

For those involved in web development using Elixir, MDEx offers a comprehensive set of features tailored to make Markdown processing smoother and more versatile. Its inclusion of additional formats, syntax highlighting, and the convenient ability to handle streaming fragments makes it a standout option in the ever-growing array of Markdown libraries.

Features

  • CommonMark Compliance: Follows the official CommonMark specification, ensuring high compatibility with existing Markdown documents.

  • Multiple Formats Support: Easily converts documents into various formats, including HTML, JSON, XML, and Quill Delta, catering to diverse application needs.

  • Built-in Syntax Highlighting: Automatically highlights syntax in code blocks, enhancing readability for developers who wish to showcase code snippets.

  • Streaming Incomplete Fragments: Offers the ability to handle streaming of incomplete Markdown fragments, which is particularly useful in dynamic content scenarios.

  • Emoji Shortcodes: Supports the use of emoji shortcodes, allowing users to enrich their Markdown with expressive visual elements.

  • Phoenix HEEx Components Integration: Seamlessly integrates with Phoenix HEEx, allowing developers to embed components within Markdown documents.

  • Code Block Decorators: Allows for customization of code blocks, providing flexibility in how code is displayed and styled.

  • AST and API Integration: Utilizes an Abstract Syntax Tree (AST) for advanced document manipulation and integrates with a robust pipeline API, enhancing extensibility and functionality.