attr valid: return whether attrs non-empty

This commit is contained in:
Noah Hellman 2023-01-16 17:24:27 +01:00
parent 161dfec96d
commit b512c670e6
3 changed files with 39 additions and 16 deletions

View file

@ -270,7 +270,7 @@ impl BlockParser {
))
}
}
'{' => (attr::valid(line_t.chars()) == line_t.trim_end().len())
'{' => (attr::valid(line_t.chars()).0 == line_t.trim_end().len())
.then(|| (Block::Atom(Attributes), Span::by_len(start, line_t.len()))),
'|' => (&line_t[line_t.len() - 1..] == "|"
&& &line_t[line_t.len() - 2..line_t.len() - 1] != "\\")