[−][src]Function bbclash::bbcode_to_html
#[no_mangle] pub fn bbcode_to_html(input: &str) -> String
Generates a string of HTML from an &str of BBCode. This function produces pretty output, meaning that any eroneously written BBCode encountered or empty tags will be removed from the final output.
Examples
use bbclash::bbcode_to_html; assert_eq!(bbcode_to_html("I'm [i]italic[/i] and [b]bold![/b]"), "<p>I'm <i>italic</i> and <b>bold!</b></p>"); assert_eq!(bbcode_to_html("[quote][/quote]"), "");