fixup! inline: hide empty attributes from output

This commit is contained in:
Noah Hellman 2023-01-19 22:43:40 +01:00
parent 79dfd3be36
commit 79e2eab107

View file

@ -246,7 +246,7 @@ impl<I: Iterator<Item = char> + Clone> Parser<I> {
if first.kind == lex::Kind::Open(Delimiter::Brace) { if first.kind == lex::Kind::Open(Delimiter::Brace) {
let mut ahead = self.lexer.chars(); let mut ahead = self.lexer.chars();
let (mut attr_len, mut has_attr) = attr::valid(std::iter::once('{').chain(&mut ahead)); 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 { if attr_len > 0 {
while attr_len > 0 { while attr_len > 0 {
self.span = self.span.extend(attr_len); self.span = self.span.extend(attr_len);