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

Fenced code blocks emtpy #716

Open
3 tasks done
Gijsreyn opened this issue Nov 26, 2024 · 0 comments
Open
3 tasks done

Fenced code blocks emtpy #716

Gijsreyn opened this issue Nov 26, 2024 · 0 comments
Labels
Needs-Triage The issue is new and needs to be triaged by a work group.

Comments

@Gijsreyn
Copy link

Gijsreyn commented Nov 26, 2024

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues.

Steps to reproduce

When working on the PnP.PowerShell module, I noticed some of the default fenced code blocks are missing when exporting the result.

Take for example the truncated version of Add-PnPApp.md:

---
Module Name: PnP.PowerShell
schema: 2.0.0
applicable: SharePoint Online
online version: https://pnp.github.io/powershell/cmdlets/Add-PnPApp.html
external help file: PnP.PowerShell.dll-Help.xml
title: Add-PnPApp
---
  
# Add-PnPApp

## SYNOPSIS
Add/uploads an available app to the app catalog

## SYNTAX

```powershell
Add-PnPApp [-Path] <String> [-Scope <AppCatalogScope>] [-Overwrite] [-Timeout <Int32>] [-Publish [-SkipFeatureDeployment]]
 [-Connection <PnPConnection>] 

# truncated ...

Using the Import-MarkdownCommandHelp and calling the ToMarkdownString() method, removes the code fence.

image

Expected behavior

After export (or ToMarkdownString()), it should have code fenced populated with powershell.

Actual behavior

No code fencing.

Error details

Not applicable

Environment data

ModuleType Version    PreRelease Name                                PSEdition ExportedCommands
---------- -------    ---------- ----                                --------- ----------------
Script     1.0.0      preview1   Microsoft.PowerShell.PlatyPS        Desk      {New-MarkdownCommandHelp, Import-MamlHelp, Import-MarkdownCommandHelp, Import-MarkdownModuleFile…}

Name                           Value
----                           -----
PSVersion                      7.4.6
PSEdition                      Core
GitCommitId                    7.4.6
OS                             Microsoft Windows 10.0.26100
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

No response

@Gijsreyn Gijsreyn added the Needs-Triage The issue is new and needs to be triaged by a work group. label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs-Triage The issue is new and needs to be triaged by a work group.
Projects
None yet
Development

No branches or pull requests

1 participant