Skip to main content

append_body

Function append_body 

Source
pub fn append_body(layout: &Layout, id: &str, text: &str) -> Result<String>
Expand description

Append prose to an issue’s body, stamped with the date and identity.

The logbook holds one line per event, so a written report does not fit in it: note folds its text to a single line by design. Work that has been done and needs recording belongs under the heading as prose, which is where a reader looks for what the issue is about.

The text is kept as given. Lines that would end the issue are indented on the way out, so markdown is safe to append.

§Errors

Returns an error if text is empty, id is not in the corpus, or the file cannot be rewritten.