Skip to content

Commit

Permalink
Fix #85 (#87)
Browse files Browse the repository at this point in the history
Co-authored-by: DerDrodt <d.drodt@gmx.de>
  • Loading branch information
Drodt and DerDrodt authored Jan 8, 2024
1 parent 6327772 commit 68a7b3f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/csl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2285,6 +2285,16 @@ impl<'a, T: EntryLike> Context<'a, T> {
.and_then(|p| p.0.last_mut())
{
Some(ElemChild::Text(f)) => &mut f.text,
// Get the text element if it is contained in an `Elem`.
Some(ElemChild::Elem(Elem { children, .. }))
if children.0.len() == 1
&& matches!(children.0[0], ElemChild::Text(_)) =>
{
match &mut children.0[0] {
ElemChild::Text(f) => &mut f.text,
_ => unreachable!(),
}
}
_ => {
used_buf = true;
self.writing.buf.as_string_mut()
Expand Down

0 comments on commit 68a7b3f

Please sign in to comment.