#markdown #format #prettify #speed #docs #format-markdown

prettify-markdown

Format Markdown at the speed of Rust

2 unstable releases

0.2.0 Jul 18, 2022
0.1.0 Jun 29, 2022

#1596 in Text processing

MIT license

42KB
1K SLoC

Prettify Markdown

Format Markdown at the speed of Rust.

Note: A CLI is in the works if you just want to format your own code. The Markdown formatting is shared as it's own lib in case you wish to use it in your own project.

Prettify extensible, language-agnostic code formatter based on Prettier written in Rust. The core of Prettify is in it's own crate, prettify.

This library is designed to be used with the core prettify crate. This library parses the markdown to create the Prettify doc, and Prettify core will then format that doc.

use prettify::print;
use prettify_markdown::format_markdown;

fn prettify_markdown(file_contents: &str) -> String {
    print(format_markdown(file_contents))
}

Note: this crate is in very early alpha. Most features of Markdown are not supported at this time. This library will eventually support all features of GitHub flavored Markdown.

Dependencies

~8–18MB
~253K SLoC