Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot support hyphen in language identifier of code block #554

Open
dingmeng-xue opened this issue Jan 12, 2022 · 1 comment
Open

Cannot support hyphen in language identifier of code block #554

dingmeng-xue opened this issue Jan 12, 2022 · 1 comment
Labels
Area-UpdateMarkdown Issue deals with the Update-* cmdlets Needs-Retest

Comments

@dingmeng-xue
Copy link

Steps to reproduce

Given there is one existing PowerShell help markdown including below example. Please note its language identifier is azurepowershell-interactive

```azurepowershell-interactive
$rgName = "resourceGroupName"
$vnet = Get-AzVirtualNetwork -ResourceGroupName $rgName -Name "vnet"
$pip = Get-AzPublicIpAddress -ResourceGroupName $rgName -Name "publicIpName"
New-AzFirewall -Name "azFw" -ResourceGroupName $rgName -Location centralus -VirtualNetwork $vnet -PublicIpAddress $pip
```

When developer update doc again via Update-MarkdownHelp, it becomes into

```azurepowershell
-interactive
$rgName = "resourceGroupName"
$vnet = Get-AzVirtualNetwork -ResourceGroupName $rgName -Name "vnet"
$pip = Get-AzPublicIpAddress -ResourceGroupName $rgName -Name "publicIpName"
New-AzFirewall -Name "azFw" -ResourceGroupName $rgName -Location centralus -VirtualNetwork $vnet -PublicIpAddress $pip
```

You can see language identifier of code block doesn't support hyphen well. The text after hyphen is moved to the new line. We raise question because online doc will support more language identifiers https://review.docs.microsoft.com/en-us/help/contribute/code-in-docs?branch=master#inline-interactive-code-blocks

Expected behavior

```azurepowershell-interactive
$rgName = "resourceGroupName"
$vnet = Get-AzVirtualNetwork -ResourceGroupName $rgName -Name "vnet"
$pip = Get-AzPublicIpAddress -ResourceGroupName $rgName -Name "publicIpName"
New-AzFirewall -Name "azFw" -ResourceGroupName $rgName -Location centralus -VirtualNetwork $vnet -PublicIpAddress $pip
```

Actual behavior

Environment data

Script 0.14.2 platyPS

PS C:\Dev> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.2.0-preview.6
PSEdition                      Core
GitCommitId                    7.2.0-preview.6
OS                             Microsoft Windows 10.0.22000
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
@theJasonHelmick theJasonHelmick added this to the 2.0-Preview3 milestone Feb 8, 2022
@theJasonHelmick theJasonHelmick self-assigned this Feb 8, 2022
@sdwheeler sdwheeler added Needs-Investigation The behavior reported in the issue is unexpected and needs further investigation. Area-UpdateMarkdown Issue deals with the Update-* cmdlets and removed Issue-Triaged labels Apr 5, 2022
@sdwheeler sdwheeler modified the milestones: 2.0-Preview3, Planned May 24, 2024
@sdwheeler
Copy link
Collaborator

sdwheeler commented May 24, 2024

I think this may be fixed already in Microsoft.PowerShell.PlatyPS v1. Need to retest in Update scenario.

@sdwheeler sdwheeler added Needs-Retest and removed Needs-Investigation The behavior reported in the issue is unexpected and needs further investigation. labels May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-UpdateMarkdown Issue deals with the Update-* cmdlets Needs-Retest
Projects
None yet
Development

No branches or pull requests

3 participants