Skip to content

Commit 82c8c21

Browse files
authored
Include information about moving tables in examples
1 parent fb16347 commit 82c8c21

File tree

1 file changed

+37
-1
lines changed

1 file changed

+37
-1
lines changed

documentation/platyps-help.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,42 @@ New-MarkdownHelp -OutputFolder $output -Module $module -WithModulePage
3737
```
3838
then the markdown files will be generated from the information in the MAML file (found in the module) **and** using reflection on the cmdlet implementation in the module.
3939

40+
#### NOTE
41+
42+
Some cmdlets have examples containing rows and columns of information after the PowerShell commands and remarks. For example:
43+
44+
### -------------------------- Example 1: Get capabilities for the current subscription for a region --------------------------
45+
@{paragraph=PS C:\\\>}
46+
47+
```
48+
PS C:\> Get-AzureRmSqlCapability -LocationName "Central US"
49+
```
50+
51+
This command returns the capabilities for SQL Database on the current subscription for the Central US region.
52+
53+
Location : Central US
54+
Status : Available
55+
SupportedServerVersions : {12.0, 2.0}
56+
57+
However, the format of these rows and columns are not preserved when platyPS generates the MAML. In order to avoid this issue, please move the rows and columns into the code block of the example; this is how help for core PowerShell modules is written.
58+
59+
After making these changes, the resulting markdown would look like the following:
60+
61+
### -------------------------- Example 1: Get capabilities for the current subscription for a region --------------------------
62+
@{paragraph=PS C:\\\>}
63+
64+
```
65+
PS C:\> Get-AzureRmSqlCapability -LocationName "Central US"
66+
67+
Location : Central US
68+
Status : Available
69+
SupportedServerVersions : {12.0, 2.0}
70+
```
71+
72+
This command returns the capabilities for SQL Database on the current subscription for the Central US region.
73+
74+
Making these changes will allow the table to preserve the format when the MAML is displayed in the PowerShell window.
75+
4076
### Updating markdown
4177

4278
Once you have created the markdown files for each cmdlet, you must make sure to keep them up to date based on changes to the cmdlets.
@@ -188,4 +224,4 @@ To quickly see what sections your cmdlets are missing help for, run the `tools\p
188224
.\ValidateHelp.ps1 -service SERVICE -pathToRepo PATH_TO_REPO
189225
```
190226

191-
This will notify you which sections of each markdown file are missing help.
227+
This will notify you which sections of each markdown file are missing help.

0 commit comments

Comments
 (0)