I found a crash related to unmatched * and /. I didn't check any other Org formatting markers, but they may likewise be affected. I am using orgize 0.8.1.
fn main() {
let crashes = &[
"* / // a",
"\"* / // a\"",
"* * ** a",
"* 2020\n** December\n*** Experiment\nType A is marked with * and type B is marked with **.\n",
"* 2020\n:DRAWER:\n* ** a\n:END:",
];
let okies = &["* * ** :a:", "* * ** "];
for crash in crashes {
let crash = crash.to_string();
assert!(std::thread::spawn(move || {
let _ = orgize::Org::parse(&crash);
})
.join()
.is_err())
}
for ok in okies {
let ok = ok.to_string();
assert!(std::thread::spawn(move || {
let _ = orgize::Org::parse(&ok);
})
.join()
.is_ok())
}
println!("\n\n\n");
println!("***");
println!("*** All examples did/did not panic as expected, regardless the presence of panics printed above.");
println!("***");
}
Hi,
I found a crash related to unmatched * and /. I didn't check any other Org formatting markers, but they may likewise be affected. I am using orgize 0.8.1.