Skip to content

Commit

Permalink
Ensure we don’t append a blank text node
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalmoksha committed Sep 27, 2024
1 parent 273abc6 commit 01bec6d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/parser/inlines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1891,11 +1891,13 @@ impl<'a, 'r, 'o, 'c, 'd, 'i> Subject<'a, 'r, 'o, 'c, 'd, 'i> {
}
}

container.append(self.make_inline(
NodeValue::Text(String::from_utf8(label[startpos..offset].to_owned()).unwrap()),
start_column + startpos,
start_column + offset - 1,
));
if startpos != offset {
container.append(self.make_inline(
NodeValue::Text(String::from_utf8(label[startpos..offset].to_owned()).unwrap()),
start_column + startpos,
start_column + offset - 1,
));
}
}

pub fn spnl(&mut self) {
Expand Down

0 comments on commit 01bec6d

Please sign in to comment.