mirror of
https://github.com/YGGverse/ggemtext.git
synced 2026-03-31 17:15:33 +00:00
trim quote, replace GString with String
This commit is contained in:
parent
ec9b989d0a
commit
c6f747fefd
1 changed files with 4 additions and 4 deletions
|
|
@ -1,7 +1,7 @@
|
|||
use glib::{GString, Regex, RegexCompileFlags, RegexMatchFlags};
|
||||
use glib::{Regex, RegexCompileFlags, RegexMatchFlags};
|
||||
|
||||
pub struct Quote {
|
||||
pub value: GString,
|
||||
pub value: String,
|
||||
}
|
||||
|
||||
impl Quote {
|
||||
|
|
@ -15,11 +15,11 @@ impl Quote {
|
|||
);
|
||||
|
||||
// Detect value
|
||||
let value = regex.get(1)?;
|
||||
let value = regex.get(1)?.trim();
|
||||
|
||||
// Result
|
||||
Some(Self {
|
||||
value: GString::from(value.as_str()),
|
||||
value: String::from(value),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue