markup_fmt is a configurable HTML, Vue, Svelte, Astro, Angular, Jinja, Twig, Nunjucks and Vento formatter. ## Basic Usage You can format source code string by using [`format_text`] function. ```rust use markup_fmt::{config::FormatOptions, format_text, Language}; let options = FormatOptions::default(); assert_eq!("
\n", &format_text( "", Language::Html, &options, |code, _| Ok::<_, std::convert::Infallible>(code.into()), ).unwrap()); ``` For detailed documentation of configuration, please refer to [Configuration](https://markup-fmt.netlify.app/) on GitHub. If there're syntax errors in source code, it will return [`Err`]: ```rust use markup_fmt::{config::FormatOptions, format_text, FormatError, Language, SyntaxError}; let options = FormatOptions::default(); assert!(matches!( format_text( "