Doogie is a wrapper library around cmark, the C
implementation of
CommonMark. It provides some implicit memory safety around node allocation not
present in the C
library.
cargo build
use doogie::parse_document;
let document = "# My Great Document \
\
* Item 1 \
* Item 2 \
* Item 3";
let root = parse_document(document);
let renderer = root.capabilities.render.as_ref().unwrap();
println!("{}", renderer.render_xml());
The API is organized around capability objects attached to Nodes. Specifically
NodeGetter
NodeSetter
NodeTraverser
StructuralMutator
NodeRenderer
NodeDestructor
Their documentation is best viewed in rustdoc. You can run cargo doc --open
to view it in your browser.
The tests are located inline with the module code. There is a mix of property based and traditional unit style tests that mainly provide coverage around Doogie's capability system and memory safety.
cargo test
© 2018, PolySync Technologies, Inc., Devin Smith [email protected]