impl automatic heading identifiers
This commit is contained in:
parent
b726580724
commit
60dcf09c1a
5 changed files with 323 additions and 102 deletions
|
@ -100,6 +100,11 @@ impl<'s> Attributes<'s> {
|
|||
}
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn get(&self, key: &str) -> Option<&str> {
|
||||
self.iter().find(|(k, _)| *k == key).map(|(_, v)| v)
|
||||
}
|
||||
|
||||
pub fn iter(&self) -> impl Iterator<Item = (&'s str, &str)> + '_ {
|
||||
self.0
|
||||
.iter()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue