B:BD[
2.3566] → [
2.3566:3608]
pub use parse::document as parse_gemtext;
#[cfg(test)]
mod test {
use super::*;
#[test]
pub fn test_builder() {
let doc = Builder::new()
.preformatted(Some("logo"), "wooo\n/^^^^\\\n| |\n\\____/")
.line()
.h1("GAZE INTO THE SPHERE!")
.line()
.text("critics are raving")
.quote("i love the sphere - bort")
.quote("the sphere gives me purpose - frelvin")
.line()
.list(vec!["always", "trust", "the sphere"])
.link("gemini://sphere.gaze", Some("gaze more here"));
assert_eq!(
doc.build(),
r#"```logo
wooo
/^^^^\
| |
\____/
```
# GAZE INTO THE SPHERE!
critics are raving
> i love the sphere - bort
> the sphere gives me purpose - frelvin
* always
* trust
* the sphere
=> gemini://sphere.gaze gaze more here
"#
)
}
}