Fix building without parsers
[?]
Jan 13, 2021, 3:34 AM
KP6SZZ346AU4MCK2EZK3WHGGGNDMUGX7AG4CBYKVO4HZMUYRBU6ACDependencies
- [2]
Y55SCAUNFinish gemtext parsing implementation - [3]
BOFUYB6IAdd documentation and implement some feedback from Discord (https://discord.com/channels/273534239310479360/354038657075904544/796256815024701480) - [4]
JBZGFYVOAdd nom parsers for main types - [5]
J4PKMKJXAdd root doc comment, gemtext module - [6]
K37J3USBAdd WIP gemtext parsers - [*]
5II6T7YEAdd gemini library
Change contents
- replacement in gemini/src/lib.rs at line 70
pub use gemtext::parse_gemtext;#[cfg(feature = "parsers")]pub use gemtext::parse::document as parse_gemtext;#[cfg(feature = "parsers")] - edit in gemini/src/gemtext.rs at line 195[3.5806]→[3.5806:5930](∅→∅),[3.5930]→[2.683:757](∅→∅),[2.757]→[3.5991:6408](∅→∅),[3.5991]→[3.5991:6408](∅→∅),[3.6408]→[2.758:781](∅→∅),[2.781]→[3.6427:6653](∅→∅),[3.6427]→[3.6427:6653](∅→∅)
}}#[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#"```logowooo/^^^^\| |\____/```# 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"#) - edit in gemini/src/gemtext.rs at line 198
/// Parser - replacement in gemini/src/gemtext.rs at line 200
mod parse {pub mod parse { - replacement in gemini/src/gemtext.rs at line 314
pub use parse::document as parse_gemtext;[2.3566]#[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#"```logowooo/^^^^\| |\____/```# 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"#)}}