pub fn parse_file<P: AsRef<Path>>(
file_path: P,
options: &Options,
) -> Result<Document, Error>Expand description
Parse AsciiDoc content from a file.
This function reads the content from the provided file and parses it as AsciiDoc.
§Example
use std::path::Path;
use acdc_parser::{Options, SafeMode, parse_file};
let options = Options::builder()
.with_safe_mode(SafeMode::Unsafe)
.build();
let file_path = Path::new("fixtures/samples/README.adoc");
let document = parse_file(file_path, &options).unwrap();§Errors
This function returns an error if the content cannot be parsed.