Skip to content

Restore line breaks between code and paragraphs in MAML #754

@sdwheeler

Description

@sdwheeler

Summary of the new feature / enhancement

When you use Export-MamlCommandHelp to create a MAML file, the examples have no empty lines between paragraphs/code. For example:

    --------- Example 1: Get the current date and time ---------

    In this example, `Get-Date` displays the current system date and time. The output is in the
    long-date and long-time formats.
    ```powershell
    Get-Date
    ```
    ```Output
    Tuesday, June 25, 2019 14:53:32
    ```

     --------- Example 2: Get elements of the current date and time ---------

    This example shows how to use `Get-Date` to get either the date or time element. The parameter uses
    the arguments **Date**, **Time**, or **DateTime**.
    ```powershell
    Get-Date -DisplayHint Date
    ```
    ```Output
    Tuesday, June 25, 2019
    ```
    `Get-Date` uses the **DisplayHint** parameter with the **Date** argument to get only the date.

The expected output should be:

    --------- Example 1: Get the current date and time ---------

    In this example, `Get-Date` displays the current system date and time. The output is in the
    long-date and long-time formats.

    ```powershell
    Get-Date
    ```

    ```Output
    Tuesday, June 25, 2019 14:53:32
    ```

     --------- Example 2: Get elements of the current date and time ---------

    This example shows how to use `Get-Date` to get either the date or time element. The parameter uses
    the arguments **Date**, **Time**, or **DateTime**.

    ```powershell
    Get-Date -DisplayHint Date
    ```

    ```Output
    Tuesday, June 25, 2019
    ```

    `Get-Date` uses the **DisplayHint** parameter with the **Date** argument to get only the date.

Proposed technical implementation details (optional)

Steps to create example MAML:

Import-MarkdownCommandHelp .\Microsoft.PowerShell.Utility\Get-Date.md | Export-MamlCommandHelp -OutputFolder .\test
show-HelpPreview -Path .\test\Microsoft.PowerShell.Utility\Microsoft.PowerShell.Utility-Help.xml

Metadata

Metadata

Labels

BlockedTag - blocked on something external to this repoIssue-EnhancementIssue is more of a feature request than a bug

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions