RTDVYLFT3PRNC4F4TWU47YFMLQPXR65CAAB6IVS7FIY2EB7HJGJQC
/// Parse a gemtext document from utf-8 text.
pub fn parse_gemtext(input: impl AsRef<str>) -> Result<gemtext::Builder, Error<String>> {
let input = input.as_ref();
match gemtext::parse::document(input).finish() {
Ok((_, b)) => Ok(b),
Err(Error { input, code }) => Err({
let input = input.to_string();
Error { input, code }
}),
}
}
pub use gemtext::parse::document as parse_gemtext;
#[cfg(feature = "parsers")]
pub use parse::{parse_header, parse_request, parse_response, parse_status};
pub use parse::{parse_gemtext, parse_header, parse_request, parse_response, parse_status};