pub fn validate_with_source(
doc: &AdfDocument,
source: Option<&str>,
) -> Result<(), AdfValidationError>Expand description
Like validate, but source-aware.
Keeps source (the JFM markdown doc was converted from, when applicable)
so any violation is reported with the offending run’s 1-based line:column.
Pass None when there is no JFM source (e.g. ADF-format input). See issue
#1087.
§Errors
Returns AdfValidationError when the document violates one or more
allowed-children rules in the upstream content model.