bbx

Crates.iobbx
lib.rsbbx
version0.3.1
sourcesrc
created_at2024-05-01 01:04:56.246381
updated_at2024-05-01 12:39:34.865224
descriptionA robust, performant BBCode pull parser.
homepage
repositoryhttps://github.com/moonheart08/bbx
max_upload_size
id1225696
size54,792
Moony (moonheart08)

documentation

README

BBX

Crates.io MSRV Crates.io License Crates.io Version docs.rs Discord

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));
Commit count: 51

cargo fmt