markdown2pdf 0.4.0

Create PDF with Markdown files (a md to pdf transpiler)
Documentation
//! Quick perf probe to investigate the mass-html-comment-short-forms
//! stress test that exceeds the 2 s budget.

use markdown2pdf::markdown::Lexer;
use std::time::Instant;

fn main() {
    for n in [100, 500, 1000, 2000, 5000] {
        let mut s = String::new();
        for _ in 0..n {
            s.push_str("foo <!--> bar <!---> baz ");
        }
        s.push('\n');
        let len = s.len();
        let start = Instant::now();
        let mut lex = Lexer::new(s);
        let result = lex.parse();
        let elapsed = start.elapsed();
        println!(
            "n={:5} input={:6} bytes elapsed={:?} ok={}",
            n,
            len,
            elapsed,
            result.is_ok(),
        );
    }
}