mirror of
https://github.com/YGGverse/ggemtext.git
synced 2026-03-31 17:15:33 +00:00
update comments, create new string on parsed only
This commit is contained in:
parent
12091be50a
commit
04120b2c44
3 changed files with 10 additions and 7 deletions
|
|
@ -37,13 +37,16 @@ impl Header {
|
|||
};
|
||||
|
||||
// Detect header value
|
||||
let value = regex.get(2)?.to_string();
|
||||
let value = regex.get(2)?.trim();
|
||||
|
||||
if value.trim().is_empty() {
|
||||
if value.is_empty() {
|
||||
return None;
|
||||
}
|
||||
|
||||
// Result
|
||||
Some(Self { level, value })
|
||||
Some(Self {
|
||||
level,
|
||||
value: value.to_string(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue