Skip to main content

Module debug

Module debug 

Source
Expand description

Maintainer triage views. jubarte debug: triage a .docx that Word refuses, or compare two builds of one. Every report is short on purpose. It counts findings by kind, shows a few examples of each (limit), and with two files prints only what differs.

The checks are the Word-validity shapes the OpenXmlValidator does not see (see AGENTS.md, “When Word cannot open a jubarte file”):

  • orphans: w:delText/w:delInstrText with no w:del/w:moveFrom in its own story, w:t/w:instrText under a w:del, and bare runs in a text box whose anchor is deleted. w:txbxContent is a story of its own: the deletion around its anchor does not reach into it.
  • fields: begin/separate/end nesting per story, and fields whose parts disagree on being deleted.
  • bookmarks: duplicate or unpaired names and ids, an end before its start, a start and end in different w:sdt, w:tc, w:txbxContent or revision containers, and a bookmark in a single-value content control (plain text, list, date, picture, checkbox).
  • package: parts without a content type, overrides without a part, duplicate relationship ids, relationship targets and r: ids that name nothing, dangling note and comment references, unpaired comment ranges, undeclared mc:Ignorable prefixes.
  • structure: empty field codes, cells that do not end in a paragraph, rows without cells, a revision nested in one of its own kind, a body w:sectPr that is not last, and unequal source/destination range counts for a move name (Word opens it but misreads Reject All).
  • ids: revision and wp:docPr ids used twice in the package. Word opens files that repeat them, so they are leads, not causes.
  • styles: basedOn/next/link and pStyle/rStyle/tblStyle values naming no style, and two styles of one type whose names match case-insensitively (Word pairs styles by type and name, not by id).
  • chains: where bookmark starts and ends sit (parent chains, tallied).
  • elements: element counts (with two files, only the ones that differ).
  • textbox: the XML of each text box story (namespace declarations dropped), filtered by grep.
  • render (a listing, like text): what each story part should put on the page, for diagnosing a low score against Word’s PDF. Every story part is read, not only the body: sections, tables (size, style, float, direct, cell and style shading, first row), frames, anchored drawings, fields, paragraph styles and shading, text colour, highlight, run shading, hidden text, requested fonts, and the order of deleted and inserted runs. (layout) adds jubarte’s page count (Word revision style) and the face each requested font resolved to.

Modules§

diff
jubarte debug diff A B [C …]: what differs between two or more packages, element by element.

Structs§

Options
Report options.

Enums§

Check
Which reports to print.

Constants§

TRIAGE
The checks a bare jubarte debug FILE runs.

Functions§

findings
The five TRIAGE checks as crate::validate::Findings: one per example, with the triage kind and its detail in the message. The code table is the one jubarte validate prints; kinds the Ring-1 checks also cover map to the Ring-1 code.
list
--list: the package’s entries (archive order, sizes). With a second package, every entry by name with its state: = identical, ~ changed, A/B only in one.
report
The report for one package, or the differences between two.

Type Aliases§

CriticEscape
text: one line per paragraph, table and row of a story part, indented by table and text box depth; with props, the runs view. Returns the lines and the paragraph count. Escapes CriticMarkup delimiters in literal text (the markdown layer’s critic_literal, passed in by callers above it; this crate cannot name markdown - plan A5 seam).