PowerShell / platyPS

Write PowerShell External Help in Markdown
MIT License
765 stars 149 forks source link

Syntax code fence should have language specified #599

Closed ThomasNieto closed 1 year ago

ThomasNieto commented 1 year ago

Prerequisites

Steps to reproduce

Markdown lint MD40 specifies that a code fence should have a language specified. In the syntax code fence since it doesn't follow PowerShell syntax exactly the code fence should be text to not have syntax highlighting.

To resolve this issue I believe the only change is this line.

https://github.com/PowerShell/platyPS/blob/0738721dc7d98380d5c500529937709b47572275/src/Markdown.MAML/Renderer/Markdownv2Renderer.cs#L453

It needs to have the language specified.

AddCodeSnippet(GetSyntaxString(command, syntax), "text");

Expected behavior

Syntax code fences have `text` language

Actual behavior

No code fence language is specified

Error details

No response

Environment data

platyPS
7.4-preview2

Visuals

No response

ThomasNieto commented 1 year ago

Closing duplicate of #495