diff --git a/src/javascript/models/transformations/CalculateGlobalStats.jsx b/src/javascript/models/transformations/CalculateGlobalStats.jsx index 7a2f328..1c8765d 100644 --- a/src/javascript/models/transformations/CalculateGlobalStats.jsx +++ b/src/javascript/models/transformations/CalculateGlobalStats.jsx @@ -65,7 +65,7 @@ export default class CalculateGlobalStats extends ToPdfViewTransformation { parseResult.content.forEach(page => { var lastItemOfMostUsedHeight; page.textItems.forEach(item => { - if (item.height == mostUsedHeight) { + if (item.height == mostUsedHeight && item.text.trim().length > 0) { if (lastItemOfMostUsedHeight && item.y != lastItemOfMostUsedHeight.y) { const distance = lastItemOfMostUsedHeight.y - item.y; if (distance > 0) { diff --git a/src/javascript/models/transformations/DetectCodeBlocks.jsx b/src/javascript/models/transformations/DetectCodeBlocks.jsx index cc2431a..75829a6 100644 --- a/src/javascript/models/transformations/DetectCodeBlocks.jsx +++ b/src/javascript/models/transformations/DetectCodeBlocks.jsx @@ -68,6 +68,7 @@ export default class DetectCodeBlocks extends ToPdfBlockViewTransformation { annotation: ADDED_ANNOTATION, textItems: textCombiner.combine(block.textItems) }); + foundBlocks++; } newBlocks.push(preceedingCodeBlock); } else {