Skip to content

Commit 9d82cec

Browse files
authored
Merge pull request #3487 from PHPOffice/TextGrid-Helper_Use-pre-rather-than-code
Fix issue with online samples - Use <pre> tag in Helper Grid
2 parents 2d6b8b2 + 8ce5407 commit 9d82cec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/PhpSpreadsheet/Helper/TextGrid.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function (&$row): void {
4848

4949
public function render(): string
5050
{
51-
$this->gridDisplay = $this->isCli ? '' : '<code>';
51+
$this->gridDisplay = $this->isCli ? '' : '<pre>';
5252

5353
$maxRow = max($this->rows);
5454
$maxRowLength = strlen((string) $maxRow) + 1;
@@ -58,7 +58,7 @@ public function render(): string
5858
$this->renderRows($maxRowLength, $columnWidths);
5959
$this->renderFooter($maxRowLength, $columnWidths);
6060

61-
$this->gridDisplay .= $this->isCli ? '' : '</code>';
61+
$this->gridDisplay .= $this->isCli ? '' : '</pre>';
6262

6363
return $this->gridDisplay;
6464
}

0 commit comments

Comments
 (0)