From 155f2f3067ff61b635d80cff6d1580e3a9baf6e2 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Tue, 20 Feb 2024 14:10:45 +0100 Subject: [PATCH] Fix vertical table on windows --- Helper/Table.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Helper/Table.php b/Helper/Table.php index a7e3fa250..f2c386e17 100644 --- a/Helper/Table.php +++ b/Helper/Table.php @@ -365,7 +365,8 @@ public function render() for ($i = 0; $i < $maxRows; ++$i) { $cell = (string) ($row[$i] ?? ''); - $parts = explode("\n", $cell); + $eol = str_contains($cell, "\r\n") ? "\r\n" : "\n"; + $parts = explode($eol, $cell); foreach ($parts as $idx => $part) { if ($headers && !$containsColspan) { if (0 === $idx) {