Skip to content
Snippets Groups Projects
Commit 45b89e6a authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Fix when checking generated table rows

parent ea9475eb
No related branches found
No related tags found
1 merge request!1Restructuring and cleaning scripts for Mkdocs
...@@ -532,6 +532,10 @@ def parseGridTableWithSpans(gridTable:str) -> tuple[GridTableRowList, GridTableR ...@@ -532,6 +532,10 @@ def parseGridTableWithSpans(gridTable:str) -> tuple[GridTableRowList, GridTableR
forwardRowspan[cellIndex] -= 1 forwardRowspan[cellIndex] -= 1
if forwardRowspan[cellIndex] == 0 and cell.rowspan > 1: if forwardRowspan[cellIndex] == 0 and cell.rowspan > 1:
forwardRowspan[cellIndex] = cell.rowspan -1 forwardRowspan[cellIndex] = cell.rowspan -1
colspan=1
while cell.colspan > colspan:
forwardRowspan[cellIndex + colspan] = cell.rowspan - 1
colspan += 1
if not sum == numberOfColumns: if not sum == numberOfColumns:
raise ValueError('Grid table not converted properly') raise ValueError('Grid table not converted properly')
...@@ -551,6 +555,11 @@ def parseGridTableWithSpans(gridTable:str) -> tuple[GridTableRowList, GridTableR ...@@ -551,6 +555,11 @@ def parseGridTableWithSpans(gridTable:str) -> tuple[GridTableRowList, GridTableR
forwardRowspan[cellIndex] -= 1 forwardRowspan[cellIndex] -= 1
if forwardRowspan[cellIndex] == 0 and cell.rowspan > 1: if forwardRowspan[cellIndex] == 0 and cell.rowspan > 1:
forwardRowspan[cellIndex] = cell.rowspan - 1 forwardRowspan[cellIndex] = cell.rowspan - 1
colspan=1
while cell.colspan > colspan:
forwardRowspan[cellIndex + colspan] = cell.rowspan - 1
colspan += 1
if not sum == numberOfColumns: if not sum == numberOfColumns:
raise ValueError('Grid table not converted properly') raise ValueError('Grid table not converted properly')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment