Skip to content

Commit 57afff9

Browse files
committed
fix: rendering of youtu.be links
1 parent f0e6d2b commit 57afff9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

crates/rostra-web-ui/src/routes/content.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,11 @@ fn extract_media(url: &Url) -> Option<ExternalMedia> {
173173

174174
Some(ExternalMedia::YT(vid))
175175
}
176+
"youtu.be" => {
177+
let vid = url.path_segments()?.next_back()?;
178+
179+
Some(ExternalMedia::YT(vid.into()))
180+
}
176181
_ => None,
177182
}
178183
}

0 commit comments

Comments
 (0)