From a308b3a55d99b6de9ec56b84e4bc954c3ca79647 Mon Sep 17 00:00:00 2001 From: "Nazarov, Rodion" Date: Sun, 3 Mar 2024 14:36:18 +0100 Subject: [PATCH] [Fix] Exclude empty cells in HTML files similar to Excel handling. --- .../main/java/cz/cvut/spipes/modules/tabular/HtmlReader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s-pipes-modules/module-tabular/src/main/java/cz/cvut/spipes/modules/tabular/HtmlReader.java b/s-pipes-modules/module-tabular/src/main/java/cz/cvut/spipes/modules/tabular/HtmlReader.java index 85c484fe..06be3e71 100644 --- a/s-pipes-modules/module-tabular/src/main/java/cz/cvut/spipes/modules/tabular/HtmlReader.java +++ b/s-pipes-modules/module-tabular/src/main/java/cz/cvut/spipes/modules/tabular/HtmlReader.java @@ -168,7 +168,7 @@ private List getRowStatementsFromRow(Element row,int rowNumber, Strin cellColSpan.get(colNumber).getRight())); colNumber += cellColSpan.get(colNumber).getRight(); } - statements.add(createRowResource(cell.html(),rowNumber,outputColumns.get(colNumber),tableSchema)); + if(cell.hasText())statements.add(createRowResource(cell.html(),rowNumber,outputColumns.get(colNumber),tableSchema)); int colspan = parseInt(cell.attr("colspan"), 1); int rowspan = parseInt(cell.attr("rowspan"), 1); cellColSpan.set(colNumber, new Pair<>(rowspan-1,colspan));