| Crates.io | bbx |
| lib.rs | bbx |
| version | 0.3.1 |
| created_at | 2024-05-01 01:04:56.246381+00 |
| updated_at | 2024-05-01 12:39:34.865224+00 |
| description | A robust, performant BBCode pull parser. |
| homepage | |
| repository | https://github.com/moonheart08/bbx |
| max_upload_size | |
| id | 1225696 |
| size | 54,792 |
A robust and performant (constant time, no recursion) BBCode pull parser with no_std/alloc support.
// Parse a document, throwing all of its component tokens into the console.
let mut parser = BBParser::new(input);
for token in parser {
println!("{:?}", token);
}
// 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));