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:
+2
-2
@@ -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."));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user