We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Panic occurs when format_commonmark input contains a single NodeValue::Item:
format_commonmark
NodeValue::Item
https://github.com/kivikakk/comrak/blob/v0.29.0/src/cm.rs#L468
It didn't panic before version 0.25.0 (unwrap was introduced in #429).
unwrap
The text was updated successfully, but these errors were encountered:
That's an interesting/unexpected use case! I suppose we can revert to the previous behaviour if the stack is indeed unexpectedly empty:
let list_number = if let Some(last_stack) = self.ol_stack.last_mut() { let ln = *last_stack; if entering { *last_stack += 1; } ln } else { match node.data.borrow().value { NodeValue::Item(ref ni) => ni.start, NodeValue::TaskItem(_) => parent.start, _ => unreachable!(), } };
What do you think? Please feel free to open a PR; it'd also be great to have a test with your use case in mind so it doesn't regress!
Sorry, something went wrong.
That solution works. I'll submit a PR shortly
Successfully merging a pull request may close this issue.
Panic occurs when
format_commonmark
input contains a singleNodeValue::Item
:https://github.com/kivikakk/comrak/blob/v0.29.0/src/cm.rs#L468
It didn't panic before version 0.25.0 (
unwrap
was introduced in #429).The text was updated successfully, but these errors were encountered: