2 releases
0.0.2 | Oct 22, 2023 |
---|---|
0.0.1 | Oct 22, 2023 |
#1353 in Text processing
195KB
82 lines
morc
Dead simple, minimal markdown generator library written in Rust. Morc is in https://github.com/refcell/morc/labels/beta.
Install | User Docs | Crate Docs | Reference | Contributing | License | Attribution
What is morc?
morc
is a dead simple, minimal library for generating
valid markdown files. It was primarily built for amble
but ripped out into it's own crate to provide an extensible
library, published on crates.io.
Usage
Add morc
as a dependency with cargo.
cargo add morc
A short example to generate markdown with morc
is shown below.
use morc::core::{Document, Header, Section, Validate};
fn main() {
let doc = Document {
sections: vec![Box::new(Section {
header: Some(Header::new(1, "Hello".to_string())),
body: None,
subsections: vec![],
})],
};
assert!(doc.validate());
}
Contributing
All contributions are welcome! Experimentation is highly encouraged and new issues are welcome.
Troubleshooting & Bug Reports
Please check existing issues for similar bugs or open an issue if no relevant issue already exists.
Attribution
Morc is built from first principles, designed from scratch with minimal external references. It is a sandboxed experiment in design.
License
This project is licensed under the MIT License. Free and open-source, forever. All our rust are belong to you.
Dependencies
~0.8–1.7MB
~37K SLoC