use html2md;
use regex::Regex;


/*
    Content needs to be processed in chunks. 
    Separate out content into blocks that can be used by the UI framework
    p -> text
    a -> link (does this exist?)
    img - > image widget

    and so on...
*/

/* this works, but...
- images are omitted
- Blockquotes don't display
*/
pub fn process(content: String) -> String {
    let re = Regex::new(r"(?s)<iframe[^>]*>.*?</iframe>").unwrap();
    let cleaned = re.replace_all(&content,"");
    html2md::parse_html(&cleaned)
}