Commit 48a0bd21 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Small correction for newlines in tables

parent d8b22298
Loading
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -202,12 +202,17 @@ def parseGridTableWithSpans(gridTable:str) -> tuple[GridTableRowList, GridTableR
					cell.content += _c + _nextListElementMark
				else: # Multiline content is concatenated to the last line with a space
					cell.content += ' ' +  _c + _nextListElementMark #add list element end mark
			elif len(_c) == 0:  # separation between list and other paragraph
			elif len(_c) == 0 or _c.endswith('>'):  # separation between list and other paragraph
				if cell.listFlag:
					cell.listFlag = False
					cell.content += '\n\n' #end list by \n
				#content = re.sub(r'\\\s*$', "\n", content.strip())
				cell.content += '\n' if not cell.content.endswith('\n') else ''
				if len(_c) == 0:
					cell.content += '\n'
				else:
					_c = re.sub(r'\\\s*$', '\n', _c)
					cell.content += _c + '\n'
				#cell.content += '\n' if not cell.content.endswith('\n') else ''
			else:
				if cell.content.endswith('\n'): # a force linebreak is present
					cell.content += re.sub(r'\\\s*$', '\n', _c)