A pure Elixir library for parsing Markdown into HTML and AST with extensive customization options.
Earmark is a pure Elixir Markdown processor that parses Markdown text into HTML or an abstract syntax tree (AST). It provides a reliable foundation for Elixir applications needing Markdown support, with features like AST transformation, customizable postprocessors, and EEx template integration. The project emphasizes correctness, extensibility, and seamless integration within the Elixir ecosystem.
Elixir developers building applications that require robust Markdown processing, such as documentation generators, static site generators, or content management systems. It is also suitable for developers needing to customize Markdown rendering through AST manipulation or post-processing.
Developers choose Earmark for its pure Elixir implementation with no external dependencies, ensuring performance and integration within Elixir projects. Its unique selling points include deep AST transformation capabilities, experimental annotation support, and flexible postprocessors that allow extensive customization of output.
Markdown parser for Elixir
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
No external dependencies ensure seamless integration and performance within Elixir projects, as emphasized in the README's focus on Elixir ecosystem compatibility.
Provides functions like map_ast and walk_and_modify_ast to traverse and modify the parsed AST, enabling extensive custom post-processing and extensions, with detailed examples in the README.
Can process Embedded Elixir (.eex) templates to generate Markdown dynamically before parsing, allowing for dynamic content integration and file inclusion, as shown in the include/2 function.
Supports tag-specific and global transformations through registered_processors, making it easy to modify output attributes and structure, with clear examples for adding classes or targets to links.
Annotations are marked as experimental, meaning they may be unstable or subject to breaking changes, which is risky for production-critical applications relying on this feature.
The AST manipulation functions require a deep understanding of the AST structure and conventions, adding a steep learning curve for developers new to such low-level modifications.
Being pure Elixir restricts its use to Elixir projects, excluding teams in multi-language environments or those needing cross-platform Markdown processing libraries.