Added
- (config):
strict_parsecontrols what happens when a text-like document cannot be parsed in its own format.
By default (false), a YAML, JSON, TOML or XML file that fails to parse, an XML or SVG file that trips
security_limits.max_entity_length, and a CSV or TSV file that tripssecurity_limits.max_table_cellsare extracted
as plain text instead of failing, and the reason is recorded inprocessing_warnings(sourceparse-fallback).
Plain-text recovery is truncated tosecurity_limits.max_content_sizewith a warning. Setstrict_parse = true
(CLI--strict-parse true, environmentXBERG_STRICT_PARSE) to keep the error. The limits are not loosened, and
limits aimed at hostile input (archive size, nesting, XML depth) still fail the extraction.
Changed
- Updated dependencies, including
tree-sitter-language-pack1.22.1 (25 refreshed grammars),zip9.0.2,biblib0.10,
html-escape0.3 andunhwp0.19.ortstays at 2.0.0-rc.13 because rc.14 requires anEnvironmentfor every
session builder.
Fixed
- (extraction): a Helm template or other unparseable YAML, JSON, TOML or XML file no longer fails the extraction.
The content is returned as plain text with a warning;strict_parse = truerestores the error. (GH#2100) - (extraction): an oversized XML entity or table no longer discards a text file. A CSV over
security_limits.max_table_cellsor an XML or SVG file oversecurity_limits.max_entity_lengthis extracted as plain
text with a warning naming the limit that tripped; both limits remain adjustable throughsecurity_limits.
(GH#2101) - (release): the Helm chart is published even when the CLI image build fails. The chart publish was gated on the
aggregate result of the image manifest job, so a CLI image leg timing out skipped the chart for 1.3.6 to 1.3.8 while
the container images shipped. It is now gated on thexbergandxberg:<version>-coremanifests resolving, the only
images the chart references. (GH#2106) - (pdf): image bounding boxes are correct for images drawn inside a Form XObject with a
/Matrix. The form
/Matrixwas applied after the page transform instead of before it, so the form's page translation was scaled by
its own matrix andExtractedImage.bounding_boxlanded in the wrong place (a regression since 1.2.7). (GH#2103) - (pdf): a narrow margin-note column is read before the main text again. A column of notes set on its own leading
beside the main text (no note line shares a baseline with a body line) gave the two-column repair too few
gutter votes once a table's grid rows stopped voting, so the page was read line by line across both columns and
the margin label was welded to the main heading. A page whose only whitespace corridor is a gutter narrower than
the native XY-cut's 15 pt valley is now split at that corridor. (GH#2102) - (rendering): a block with many inline annotations renders in linear time. Building the inline nodes of one
paragraph rescanned every later annotation for each annotation, so Markdown or chunked extraction of a block dense
with emphasis, code spans and links grew quadratically (1 MiB: 29 s, 4 MiB: over 400 s). The scan now stops at the
end of the annotated span. The output does not change. (GH#2099) - (pdf): two-column pages whose column baselines differ by up to 1pt are read in column order again. The XY-cut
line grouping measured gaps between spans inyorder, so a right-column line set slightly higher sorted first and
merged with the left column's line into one line, which the column split then sent to one side. Spans are now
ordered byxbefore gaps are measured, and a gap is measured from the line's rightmost edge so far. A column cut
that would separate short label/value rows whose baselines differ slightly is refused, so key-value rows and table
rows read row by row. (GH#2097) - (pptx, ocr): plain output of a PPTX file has the OCR text of a picture on a slide. The text is in
contentand
in the content of the slide one time. Before, OCR read the picture and the text was in no part of the plain output.
The text is also there whenimages.inject_placeholdersisfalsein Markdown, Djot and HTML output. (GH#2086) - (ocr): text that has the form of a Markdown image reference does not repeat the OCR text of a picture. When a
document had a paragraph such asas text, and a picture whose OCR text is shown without a
placeholder, the text of the picture was incontenttwo times. A PDF file with the default settings is such a
document. The text is now there one time. (GH#2093) - (ppt, ocr): the content of a slide in
pageshas the OCR text of a picture in plain output. OCR read the picture
on a PPT slide and the text was incontentof plain output, but not in the content of the slide. Page content that
is built from the elements of a page now has the text one time, after the text of the picture, whencontentis the
plain rendering: in plain output, and in the output of a custom format name that has no renderer. Page content is
built that way when the extractor stores no pages: a PPT file is such a document, and a PDF file is one when page
extraction is not set. The page content of Markdown, Djot, HTML, JSON and a custom renderer does not change.
(GH#2088) - (pdf, ocr): a failed OCR fallback for a whole PDF now reports its failed pages in
ocr_page_failures. When the
OCR run of a whole document failed and the native text was kept, the result had a warning and no record. Each page
that has no native text now has a record, as it does when OCR runs on the scanned pages only. A page that has
native text has no record. A page that failed in one OCR pipeline stage and got no text from a later stage had no
record either, and now has one. (GH#2083)