From 7471a8d5bd9718c0748eab45a2cc9f621899a08d Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Mon, 10 May 2021 13:01:01 -0300 Subject: [PATCH] Some small layout fixes --- src/storage/org.rs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/storage/org.rs b/src/storage/org.rs index 32c7979..369a3ab 100644 --- a/src/storage/org.rs +++ b/src/storage/org.rs @@ -80,7 +80,7 @@ fn walk(input: &Handle, result: &mut String) { "html" | "head" | "body" => keep_going!(input, result), "p" | "br" => { keep_going!(input, result); - result.push_str("\n "); + result.push_str("\n\n "); } "span" => { let attrs = attrs.borrow(); @@ -146,9 +146,7 @@ impl Org { } } - /// Adds information about the attachments - fn attachments(&self, fp: &mut File, record: &Data) {} - + /// Do the initialization of saving the data in Org format. fn start_org<'a>(&self, record: &'a Data) -> Dump<'a> { let org_file = self.path.join(&self.filename); let fp = OpenOptions::new() @@ -177,7 +175,7 @@ impl Org { Dump { fp, record, - path: self.path, + path: self.path.to_path_buf(), } } } @@ -237,8 +235,11 @@ impl Dump<'_> { ); attachment.download().copy_to(&mut target).unwrap(); - let attachment_info = - format!(" - [[{}][{}]\n", in_storage.to_string_lossy(), filename); + let attachment_info = format!( + " - [[file:{}][{}]\n", + in_storage.to_string_lossy(), + filename + ); self.fp.write_all(attachment_info.as_bytes()).unwrap(); } Dump::prologue(&mut self.fp);