Skip to content

New-DscResourcePowerShellHelp: Reduce duplicate code  #58

@johlju

Description

@johlju

Suggest making a helper function for this section as is is duplicated three times in this function.

$synopsis = $synopsis -replace '[\r|\n]+$' # Removes all blank rows at the end
$synopsis = $synopsis -replace '\r?\n', "`r`n" # Normalize to CRLF
$synopsis = $synopsis -replace '\r\n', "`r`n " # Indent all rows
$synopsis = $synopsis -replace '[ ]+\r\n', "`r`n" # Remove indentation from blank rows

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementThe issue is an enhancement request.good first issueThe issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHubhelp wantedThe issue is up for grabs for anyone in the community.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions