Commonmarker

screenshot of Commonmarker

Ruby wrapper for the comrak (CommonMark parser) Rust crate

Overview

Commonmarker is an exciting Ruby wrapper for Rust's comrak crate, designed to provide a comprehensive implementation of the CommonMark specification. With its ability to pass all the tests from the CommonMark suite, this gem is a solid choice for developers needing reliable Markdown support. Beyond basic Markdown features, it also includes additional extensions, such as tables, strikethroughs, and autolinking, making it adaptable for various use cases.

The gem’s ease of installation and versatility in converting strings into HTML set it apart from other Markdown processors. Whether you’re generating simple web pages or complex documents, Commonmarker simplifies the process while maintaining compatibility with UTF-8 strings for broader usability.

Features

  • Spec-Complete: Passes all CommonMark test suite cases, ensuring full compliance with the specification.

  • Extended Functionality: Includes GitHub Flavored Markdown extensions like tables, strikethroughs, and autolinking.

  • Convenient Extensions: By default, several user-friendly extensions are enabled for seamless HTML generation.

  • Flexible Document Handling: Allows users to parse strings into document nodes and manipulate them with operations like inserting, appending, and deleting nodes.

  • Iterative Node Processing: Offers methods such as walk and each for iterating over nodes, providing flexibility in navigating the document structure.

  • Raw CommonMark Conversion: Easily convert documents back into raw CommonMark format for further processing or storage.

  • Customizable Options: Accepts a range of parse, render, and extensions options for tailored Markdown processing.