Skip to content

New-ExternalHelp removes specific carriage returns #508

@chrisda

Description

@chrisda

It appears that if a line of text in the SYNOPSIS section of a markdown topic starts with bold formatting, the carriage returns around that line of text are not honored when running New-ExternalHelp.

Sample text in markdown topic (note that there are 4 distinct lines of text/paragraphs):

## SYNOPSIS
This cmdlet is available only in the cloud-based service.

Use the Get-HostedConnectionFilterPolicy cmdlet to view the settings of connection filter policies in your cloud-based organization.

**Note**: We recommend that you use the Exchange Online PowerShell V2 module to connect to Exchange Online PowerShell. For instructions, see [Connect to Exchange Online PowerShell](https://docs.microsoft.com/powershell/exchange/connect-to-exchange-online-powershell).

For information about the parameter sets in the Syntax section below, see [Exchange cmdlet syntax](https://docs.microsoft.com/powershell/exchange/exchange-cmdlet-syntax).

Result (note that there are only 3 paragraphs; the Note paragraph is munged together with the previous paragraph):

      <maml:description>
        <maml:para>This cmdlet is available only in the cloud-based service.</maml:para>
        <maml:para>Use the Get-HostedConnectionFilterPolicy cmdlet to view the settings of connection filter policies in your cloud-based organization. Note : We recommend that you use the Exchange Online PowerShell V2 module to connect to Exchange Online PowerShell. For instructions, see Connect to Exchange Online PowerShell (https://docs.microsoft.com/powershell/exchange/connect-to-exchange-online-powershell).</maml:para>
        <maml:para>For information about the parameter sets in the Syntax section below, see Exchange cmdlet syntax (https://docs.microsoft.com/powershell/exchange/exchange-cmdlet-syntax).</maml:para>
      </maml:description>

Attached is a topic and the resulting XML file for inspection.
platyPSissue.zip

Steps to reproduce

  1. Take a markdown topic that contains a line of text in the SYNOPSIS section that contains a **Note** paragraph.

  2. Run the following command:

    New-ExternalHelp -Path "<Path to markdown topic"> -OutputPath "<Output folder>"

Expected behavior

The line of text that starts with **Note** should be contained within its own <maml:para></maml:para> tag.

Actual behavior

The line of text that starts with **Note** is not contained within its own <maml:para></maml:para> tag. It's treated as if it's a second sentence in the previous line of text

Environment data

  • platyPS 0.14.1
  • Windows 10 Enterprise 20H2
  • Windows PowerShell 5.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-MAMLIssue concerns conversion to MAMLIssue-BugIssue has been identified as a bug in the productResolution-Won't FixThe issue won't be fixed, possibly due to compatibility reason.platyps-0.14.2

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions