feat: Remove ### Rough Draft: marker, use YAML frontmatter only for draft files

- Everything after YAML frontmatter closing --- is now considered the draft content
- No ### Rough Draft: marker needed
- Chapter titles are handled by the program on export based on file order
- Draft content should not include chapter titles
- Updated default_new_file_template to use YAML frontmatter
- Updated preprocess.rs to parse YAML frontmatter for metadata
- Updated all relevant tests
- Updated documentation in help.rs
- Updated template files

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
landon
2026-09-16 13:33:23 -05:00
parent aafe1786b5
commit a0d1c3c206
11 changed files with 243 additions and 550 deletions
+2 -2
View File
@@ -834,8 +834,8 @@ mod tests {
#[test]
fn commented_prose_is_dropped_from_the_exported_body() {
// The whole point of the hotkey: preprocess must not see the hidden line.
let md = "### Rough Draft:\n\nKeep this.\n\n<!-- Cut this. -->\n";
let body = crate::preprocess::parse(md, "### Rough Draft:").body;
let md = "---\ntitle: Test\n---\n\nKeep this.\n\n<!-- Cut this. -->\n";
let body = crate::preprocess::parse(md, "").body;
assert!(body.contains("Keep this."));
assert!(!body.contains("Cut this."));
}