fix: remove unused import and dead code from title sync refactor

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
lucaronin
2026-03-17 17:08:07 +01:00
parent 0ac8ad8dff
commit c02584fd86
2 changed files with 1 additions and 18 deletions

View File

@@ -24,7 +24,7 @@ pub use trash::{batch_delete_notes, delete_note, empty_trash, is_file_trashed, p
use file::read_file_metadata;
use frontmatter::{extract_fm_and_rels, parse_created_at, resolve_is_a};
use parsing::{count_body_words, extract_outgoing_links, extract_snippet, extract_title, slug_to_title};
use parsing::{count_body_words, extract_outgoing_links, extract_snippet, extract_title};
use gray_matter::engine::YAML;
use gray_matter::Matter;

View File

@@ -148,23 +148,6 @@ fn extract_fm_title_value(content: &str) -> Option<String> {
None
}
/// Check if frontmatter contains a `title:` key.
fn frontmatter_has_title_key(content: &str) -> bool {
if !content.starts_with("---\n") {
return false;
}
content[4..]
.split("\n---")
.next()
.map(|fm| {
fm.lines().any(|l| {
let t = l.trim_start();
t.starts_with("title:") || t.starts_with("\"title\":")
})
})
.unwrap_or(false)
}
/// Update H1 and the `title:` frontmatter field in content.
/// Always writes `title` to frontmatter (creates it if absent).
fn update_note_title_in_content(content: &str, new_title: &str) -> String {