diff --git a/gemtext/src/lib.rs b/gemtext/src/lib.rs index ca62fa7..5f4c3bb 100644 --- a/gemtext/src/lib.rs +++ b/gemtext/src/lib.rs @@ -18,6 +18,28 @@ impl Builder { self } + /// Append a single blank line to the document + /// + /// This is equivilent to calling [`text()`] with an empty string, or pushing a blank + /// [`Node`] + /// + /// ``` + /// # use gemtext::Builder; + /// let greeting = Builder::new() + /// .text("Hello") + /// .blank_line() + /// .text("universe") + /// .to_string(); + /// + /// assert_eq!(greeting.trim(), "Hello\n\nuniverse"); + /// ``` + /// + /// [`text()`]: Self::text() + pub fn blank_line(mut self) -> Self { + self.nodes.push(Node::blank()); + self + } + pub fn link>(mut self, to: T, name: Option) -> Builder { self.nodes.push(Node::Link { to: to.into(),