update
This commit is contained in:
parent
a85efe2056
commit
6f7fa9c920
16 changed files with 622 additions and 229 deletions
|
|
@ -12,25 +12,13 @@ impl<'a> Keyword<'a> {
|
|||
|
||||
let end = eol!(src);
|
||||
|
||||
if end == key + 1 {
|
||||
Some((
|
||||
Keyword {
|
||||
key: &src[2..key],
|
||||
value: "",
|
||||
},
|
||||
end,
|
||||
))
|
||||
} else {
|
||||
let space = position!(src, key + 1, |c| !c.is_ascii_whitespace());
|
||||
|
||||
Some((
|
||||
Keyword {
|
||||
key: &src[2..key],
|
||||
value: &src[space..end],
|
||||
},
|
||||
end,
|
||||
))
|
||||
}
|
||||
Some((
|
||||
Keyword {
|
||||
key: &src[2..key],
|
||||
value: &src[key + 1..end].trim(),
|
||||
},
|
||||
end,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue