New-UDMarkdown not rendering as expected?

Product: PowerShell Universal
Version: 3.9.13

i have the following code block and it doesn’t look like it’s doing a carriage return as i expect:

New-UDGrid -Container -Children {
    New-UDGrid -Item -ExtraSmallSize 8 -Children {
        New-UDPaper -Elevation 2 -Children {
            New-UDMarkdown -Markdown "# Server Lifecycle Management

            Hello Wizards, welcome to the new lifecycle management app!
            "
        }
    }
}

and this is how it renders:

am i missing something? thought i knew how to markdown lol.

TIA

Seems like this behavior occurs in UDPaper only and looks as expected with it removed. was trying to be crafty with aesthetics as i like the paper component.

What happens if you put your markdown in a .md file and use the code:

New-UDHtml -Markup (ConvertFrom-Markdown -path "/Path/To/File.md").Html

Plan C could be just to use:

New-UDHeading -Size 1 -Text "Server Lifecycle Management"
New-UDParagraph -Text "Hello Wizards, welcome to the new lifecycle management app!"

I suspect multi-lining may be your problem there.

You can fix this by overriding the display type:

        New-UDPaper -Elevation 2 -Children {
            New-UDMarkdown -Markdown "# Server Lifecycle Management

            Hello Wizards, welcome to the new lifecycle management app!
            "
        } -Style @{
           display = "block" 
       }
1 Like