-
-
Notifications
You must be signed in to change notification settings - Fork 63
Description
Hello,
This input *
(without the double quotes) causes markdown::to_html
to panic.
e.g.
fn main() {
println!("{}", markdown::to_html("* "));
}
Just in case, I've pasted the stacktrace below.
Cheers, let me know if I can provide anything else to help.
thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', /home/me/.cargo/registry/src/github.com-1ecc6299db9ec823/markdown-0.3.0/src/parser/block/unordered_list.rs:84:44
stack backtrace:
0: rust_begin_unwind
at /rustc/96ddd32c4bfb1d78f0cd03eb068b1710a8cebeef/library/std/src/panicking.rs:575:5
1: core::panicking::panic_fmt
at /rustc/96ddd32c4bfb1d78f0cd03eb068b1710a8cebeef/library/core/src/panicking.rs:65:14
2: core::panicking::panic_bounds_check
at /rustc/96ddd32c4bfb1d78f0cd03eb068b1710a8cebeef/library/core/src/panicking.rs:150:5
3: <usize as core::slice::index::SliceIndex<[T]>>::index
at /rustc/96ddd32c4bfb1d78f0cd03eb068b1710a8cebeef/library/core/src/slice/index.rs:259:10
4: core::slice::index::<impl core::ops::index::Index for [T]>::index
at /rustc/96ddd32c4bfb1d78f0cd03eb068b1710a8cebeef/library/core/src/slice/index.rs:18:9
5: <alloc::vec::Vec<T,A> as core::ops::index::Index>::index
at /rustc/96ddd32c4bfb1d78f0cd03eb068b1710a8cebeef/library/alloc/src/vec/mod.rs:2736:9
6: markdown::parser::block::unordered_list::parse_unordered_list
at /home/me/.cargo/registry/src/github.com-1ecc6299db9ec823/markdown-0.3.0/src/parser/block/unordered_list.rs:84:44
7: markdown::parser::block::parse_block
at /home/me/.cargo/registry/src/github.com-1ecc6299db9ec823/markdown-0.3.0/src/parser/block/mod.rs:71:5
8: markdown::parser::block::parse_blocks
at /home/me/.cargo/registry/src/github.com-1ecc6299db9ec823/markdown-0.3.0/src/parser/block/mod.rs:27:15
9: markdown::parser::parse
at /home/me/.cargo/registry/src/github.com-1ecc6299db9ec823/markdown-0.3.0/src/parser/mod.rs:43:5
10: markdown::to_html
at /home/me/.cargo/registry/src/github.com-1ecc6299db9ec823/markdown-0.3.0/src/lib.rs:29:18
11: markdown_bug::main
at ./frontend/examples/markdown_bug.rs:2:20
12: core::ops::function::FnOnce::call_once
at /rustc/96ddd32c4bfb1d78f0cd03eb068b1710a8cebeef/library/core/src/ops/function.rs:513:5