Skip to content

Commit

Permalink
try to satisfy msrv?
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-i-m committed May 17, 2020
1 parent 2d63286 commit 91e3aa4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/book/summary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -374,10 +374,12 @@ impl<'a> SummaryParser<'a> {

loop {
match self.next_event() {
Some(ev @ Event::Start(Tag::Paragraph)) if !first => {
// we're starting the suffix chapters
self.back(ev);
break;
Some(ev @ Event::Start(Tag::Paragraph)) => {
if !first {
// we're starting the suffix chapters
self.back(ev);
break;
}
}
// The expectation is that pulldown cmark will terminate a paragraph before a new
// heading, so we can always count on this to return without skipping headings.
Expand Down

0 comments on commit 91e3aa4

Please sign in to comment.