aboutsummaryrefslogtreecommitdiffstats
path: root/src/construct/heading_setext.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/construct/heading_setext.rs')
-rw-r--r--src/construct/heading_setext.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/construct/heading_setext.rs b/src/construct/heading_setext.rs
index 6e0ec08..d66f339 100644
--- a/src/construct/heading_setext.rs
+++ b/src/construct/heading_setext.rs
@@ -92,13 +92,12 @@ pub fn start(tokenizer: &mut Tokenizer) -> State {
&& !tokenizer.pierce
// Require a paragraph before.
&& (!tokenizer.events.is_empty()
- && tokenizer.events[skip::opt_back(
+ && matches!(tokenizer.events[skip::opt_back(
&tokenizer.events,
tokenizer.events.len() - 1,
&[Name::LineEnding, Name::SpaceOrTab],
)]
- .name
- == Name::Content)
+ .name, Name::Content | Name::HeadingSetextUnderline))
{
tokenizer.enter(Name::HeadingSetextUnderline);