From 79e2eab10785334c1b56c1fa7ff5d2557952fa43 Mon Sep 17 00:00:00 2001 From: Noah Hellman Date: Thu, 19 Jan 2023 22:43:40 +0100 Subject: [PATCH] fixup! inline: hide empty attributes from output --- src/inline.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/inline.rs b/src/inline.rs index afc71cd..6fae30e 100644 --- a/src/inline.rs +++ b/src/inline.rs @@ -246,7 +246,7 @@ impl + Clone> Parser { if first.kind == lex::Kind::Open(Delimiter::Brace) { let mut ahead = self.lexer.chars(); let (mut attr_len, mut has_attr) = attr::valid(std::iter::once('{').chain(&mut ahead)); - attr_len -= 1; // rm { + attr_len = attr_len.saturating_sub(1); // rm { if attr_len > 0 { while attr_len > 0 { self.span = self.span.extend(attr_len);