4 releases (2 breaking)
0.3.1 | May 1, 2024 |
---|---|
0.3.0 | May 1, 2024 |
0.2.0 | May 1, 2024 |
0.1.0 | May 1, 2024 |
#196 in Memory management
95 downloads per month
53KB
1K
SLoC
BBX
A robust and performant (constant time, no recursion) BBCode pull parser with no_std
/alloc
support.
Examples
Quick parsing
// Parse a document, throwing all of its component tokens into the console.
let mut parser = BBParser::new(input);
for token in parser {
println!("{:?}", token);
}
Quick sanitized HTML output
// Simple serializer default with all of the v1.0.0 (or earlier) tags considered "core" to the library.
let mut serializer: HtmlSerializer<SimpleHtmlWriter> =
HtmlSerializer::with_tags(all_core_v1_tags());
let mut parser = BBParser::new(input);
println!("Document:");
println!("{}", serializer.serialize(parser));
Dependencies
~180KB