Skip to content

Commit

Permalink
inlines: don't crash on empty content here
Browse files Browse the repository at this point in the history
  • Loading branch information
kivikakk committed Jun 6, 2023
1 parent 94585ad commit 0d6a5c9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/parser/inlines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,13 @@ impl<'a, 'r, 'o, 'd, 'i, 'c, 'subj> Subject<'a, 'r, 'o, 'd, 'i, 'c, 'subj> {
&& match bracket_inl_text.next_sibling() {
Some(n) => {
if n.data.borrow().value.text().is_some() {
n.data.borrow().value.text().unwrap().as_bytes()[0] == b'^'
n.data
.borrow()
.value
.text()
.unwrap()
.as_bytes()
.starts_with(&[b'^'])
} else {
false
}
Expand Down

0 comments on commit 0d6a5c9

Please sign in to comment.