Add a blank_line() method to Builder #13

Merged
cadey merged 1 commits from :blank-line into main 2020-12-06 01:14:25 +00:00
1 changed files with 11 additions and 0 deletions
Showing only changes of commit ac88fb60ee - Show all commits

View File

@ -18,6 +18,17 @@ impl Builder {
self self
} }
/// Append a single blank line to the document
///
/// This is equivilent to calling [`text()`] with an empty string, or pushing a blank
/// [`Node`]
///
/// [`text()`]: Self::text()
pub fn blank_line(mut self) -> Self {
self.nodes.push(Node::blank());
self
}
pub fn link<T: Into<String>>(mut self, to: T, name: Option<String>) -> Builder { pub fn link<T: Into<String>>(mut self, to: T, name: Option<String>) -> Builder {
self.nodes.push(Node::Link { self.nodes.push(Node::Link {
to: to.into(), to: to.into(),