Skip to content

A fast, helpful, and open-source document parser

lint

Pierre-Loic doulcetef95d6124ffe
diff --git a/src/processing/gridProjection.ts b/src/processing/gridProjection.ts
index e8888c6..23d8476 100644
--- a/src/processing/gridProjection.ts
+++ b/src/processing/gridProjection.ts
@@ -900,7 +900,8 @@ export function bboxToLine(
// rounding artifacts from causing word fusions (e.g., "of" + "our" → "ofour"
// when Math.round(w) reduces the gap from 1.34 to 1.0)
const roundedGap = currentLine.x - previousLine.x - previousLine.w;
- const rawGap = currentLine.x - previousLine.x - (previousLine.pageBbox?.w ?? previousLine.w);
+ const rawGap =
+ currentLine.x - previousLine.x - (previousLine.pageBbox?.w ?? previousLine.w);
if (!bothAreNumbers && roundedGap <= mergeThreshold && rawGap <= mergeThreshold) {
// if same word but less than .7 of prev line
if (currentLine.h != 0 && currentLine.h < previousLine.h * 0.7) {