mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
remove lines trim
This commit is contained in:
parent
15decfa19a
commit
96d06c1ffb
1 changed files with 3 additions and 3 deletions
|
|
@ -11,10 +11,10 @@ impl Multiline {
|
||||||
// return Self constructed on success or None
|
// return Self constructed on success or None
|
||||||
pub fn begin_from(line: &str) -> Option<Self> {
|
pub fn begin_from(line: &str) -> Option<Self> {
|
||||||
if line.starts_with("```") {
|
if line.starts_with("```") {
|
||||||
let alt = line.trim_start_matches("```").trim();
|
let alt = line.trim_start_matches("```");
|
||||||
|
|
||||||
return Some(Self {
|
return Some(Self {
|
||||||
alt: match alt.is_empty() {
|
alt: match alt.trim().is_empty() {
|
||||||
true => None,
|
true => None,
|
||||||
false => Some(GString::from(alt)),
|
false => Some(GString::from(alt)),
|
||||||
},
|
},
|
||||||
|
|
@ -41,6 +41,6 @@ impl Multiline {
|
||||||
|
|
||||||
// Append data to the buffer, trim close tag on exists
|
// Append data to the buffer, trim close tag on exists
|
||||||
self.buffer
|
self.buffer
|
||||||
.push(GString::from(line.trim_end_matches("```").trim()));
|
.push(GString::from(line.trim_end_matches("```")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue