fix: use strip_prefix instead of manual slice to satisfy clippy::manual_strip

This commit is contained in:
lucaronin
2026-02-24 23:00:52 +01:00
parent 6438c15113
commit 1cabd55d08

View File

@@ -130,8 +130,8 @@ fn is_list_continuation(line: &str) -> bool {
fn split_frontmatter(content: &str) -> Result<(&str, &str), String> {
let after_open = &content[4..];
// Handle empty frontmatter: closing --- immediately after opening ---\n
if after_open.starts_with("---") {
return Ok(("", &after_open[3..]));
if let Some(stripped) = after_open.strip_prefix("---") {
return Ok(("", stripped));
}
let fm_end = after_open
.find("\n---")