Skip to main content

diff_documents_view

Function diff_documents_view 

Source
pub fn diff_documents_view(
    old: Source<'_>,
    new: Source<'_>,
    options: &TextOptions,
) -> Result<String, String>
Expand description

Compares two DOCX bytes or Markdown text snapshots in the review presentation options.format names. DOCX revision acceptance runs on the package before text extraction, so removed paragraphs and table rows cannot contribute phantom line numbers.

§Inputs

  • old, new — either two .docx byte slices or two Markdown strings (crate::markdown::Source).
  • options — review presentation, acceptance policy and window.

§Errors

A message when Source::Docx is given for old or new and the package cannot be admitted (a budget, a duplicate or unsafe part name, an encrypted .docx, an unsupported XML encoding, or the bytes are not a .docx).