Closed vzabawski closed 6 years ago
Hi @vzabawski Internally the HTML plugin converts using the [System.Environment]::NewLine
enum for compatibility with both Windows and Linux. Therefore, on a Windows box you should use `r`n
like so:
Import-Module -Name PScribo -Force
$ItemsArray = @()
$Item1 = [PSCustomObject] @{
Name = 'Sample text';
Description = "String1`r`nString2`r`nString3";
}
$Item2 = [PSCustomObject] @{
Name = 'Another sample text';
Description = "String1`r`nString2`r`nString3";
}
$ItemsArray += $Item1
$ItemsArray += $Item2
Document Example {
Table -Name "Example table" -InputObject $ItemsArray -Columns Name, Description
} | Export-Document -Path C:\Windows\Temp -Format html
Thank you very much. It worked for me.
I was trying to create a page with a table that contains newlines in its cells. Here's an example code:
Result:
I've tried a workaround from this issue but it didn't worked.
Result:
Environment:
Windows 10 Enterprise (Version 1803)
PScribo version: 0.7.23.119