Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src-tauri/src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,13 @@ fn sanitize_filename(title: &str) -> String {
// Trim and collapse multiple spaces into single space
let normalized: String = sanitized.split_whitespace().collect::<Vec<_>>().join(" ");

// Limit length
normalized.chars().take(50).collect()
// Limit length and trim any trailing spaces from truncation
normalized
.chars()
.take(50)
.collect::<String>()
.trim()
.to_string()
}

// Issue #5: Save article text as markdown
Expand Down