Merge pull request 'Add a `blank_line()` method to `Builder`' (#13) from alch_emii/maj-prs:blank-line into main
continuous-integration/drone/push Build is failing Details

Reviewed-on: #13
This commit is contained in:
Cadey Ratio 2020-12-06 01:14:19 +00:00
commit cf73a3bb1e
1 changed files with 11 additions and 0 deletions

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(),