trim alt text for multiline code

This commit is contained in:
yggverse 2024-10-20 12:01:09 +03:00
parent 65b051f23e
commit dbb443d361
2 changed files with 3 additions and 3 deletions

View file

@ -11,10 +11,10 @@ impl Multiline {
/// return Self constructed on success or None
pub fn begin_from(line: &str) -> Option<Self> {
if line.starts_with("```") {
let alt = line.trim_start_matches("```");
let alt = line.trim_start_matches("```").trim();
return Some(Self {
alt: match alt.trim().is_empty() {
alt: match alt.is_empty() {
true => None,
false => Some(GString::from(alt)),
},