Skip to content

Commit e265fce

Browse files
committed
Fixed GUID output for switch WithModuleMetaData
Added help for new switches
1 parent 49f649e commit e265fce

File tree

5 files changed

+15
-13
lines changed

5 files changed

+15
-13
lines changed

docs/Merge-MarkdownHelp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ Accept wildcard characters: True
142142
```
143143
144144
### -NoInputOutputFormatting
145-
{{ Fill NoInputOutputFormatting Description }}
145+
Will prevent Input/Output comments from being formatted. This might be needed because Microsoft gives us no way to actually set the values in Input/Output correct (type, description) in a PS function header, but will put everything written down there into the "type" property, so all text would be formatted bold in that case. For the Input/Output texts in a PS function header to be written without bold formatting (as is) this switch needs to be provided.
146146
147147
```yaml
148148
Type: SwitchParameter

docs/New-MarkdownHelp.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ Accept wildcard characters: False
495495
```
496496

497497
### -CreateTableOfContent
498-
{{ Fill CreateTableOfContent Description }}
498+
Will create an additional table of content in the single- or module-landing-page.
499499

500500
```yaml
501501
Type: SwitchParameter
@@ -510,7 +510,7 @@ Accept wildcard characters: False
510510
```
511511

512512
### -NoInputOutputFormatting
513-
{{ Fill NoInputOutputFormatting Description }}
513+
Will prevent Input/Output comments from being formatted. This might be needed because Microsoft gives us no way to actually set the values in Input/Output correct (type, description) in a PS function header, but will put everything written down there into the "type" property, so all text would be formatted bold in that case. For the Input/Output texts in a PS function header to be written without bold formatting (as is) this switch needs to be provided.
514514

515515
```yaml
516516
Type: SwitchParameter
@@ -525,7 +525,7 @@ Accept wildcard characters: False
525525
```
526526

527527
### -SinglePage
528-
{{ Fill SinglePage Description }}
528+
Will create a single markdown file with the description of the module and each cmdlet/function, instead of writing a new markdown file for each cmdlet/function.
529529

530530
```yaml
531531
Type: SwitchParameter
@@ -540,7 +540,7 @@ Accept wildcard characters: False
540540
```
541541

542542
### -SkipEmptyFields
543-
{{ Fill SkipEmptyFields Description }}
543+
Will omit example texts for empty fields which were not provided/found in the documentation and will instead just skip empty sections (example: no "Notes" section if no "Notes" were provided).
544544

545545
```yaml
546546
Type: SwitchParameter
@@ -555,7 +555,7 @@ Accept wildcard characters: False
555555
```
556556

557557
### -WithModuleMetaData
558-
{{ Fill WithModuleMetaData Description }}
558+
Will add a section "Module Metadata" filled with the following data (as far as that data exists): Module version, Module GUID, Author, Company, Copyright, Tags, License Uri, Project Uri.
559559

560560
```yaml
561561
Type: SwitchParameter

docs/Update-MarkdownHelp.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ Accept wildcard characters: False
233233
```
234234

235235
### -NoInputOutputFormatting
236-
{{ Fill NoInputOutputFormatting Description }}
236+
Will prevent Input/Output comments from being formatted. This might be needed because Microsoft gives us no way to actually set the values in Input/Output correct (type, description) in a PS function header, but will put everything written down there into the "type" property, so all text would be formatted bold in that case. For the Input/Output texts in a PS function header to be written without bold formatting (as is) this switch needs to be provided.
237237

238238
```yaml
239239
Type: SwitchParameter
@@ -248,7 +248,7 @@ Accept wildcard characters: False
248248
```
249249

250250
### -SkipEmptyFields
251-
{{ Fill SkipEmptyFields Description }}
251+
Will omit example texts for empty fields which were not provided/found in the documentation and will instead just skip empty sections (example: no "Notes" section if no "Notes" were provided).
252252

253253
```yaml
254254
Type: SwitchParameter

docs/Update-MarkdownHelpModule.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ Accept wildcard characters: False
241241
```
242242

243243
### -SkipEmptyFields
244-
{{ Fill SkipEmptyFields Description }}
244+
Will omit example texts for empty fields which were not provided/found in the documentation and will instead just skip empty sections (example: no "Notes" section if no "Notes" were provided).
245245

246246
```yaml
247247
Type: SwitchParameter

src/platyPS/platyPS.psm1

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,9 @@ function New-MarkdownHelp
368368
if($null -ne $ModuleMetaData) {
369369

370370
$ModuleMetaData.ModuleVersion = $ModuleVersion
371-
if($null -ne $ModuleGuid -and ![string]::IsNullOrWhiteSpace($ModuleGuid.Guid)) {
372-
$ModuleMetaData.GUID = $ModuleGuid.Guid
371+
$MetaDataGuid = $ModuleGuid.ToString()
372+
if(![string]::IsNullOrWhiteSpace($MetaDataGuid)) {
373+
$ModuleMetaData.GUID = $MetaDataGuid
373374
}
374375
if(![string]::IsNullOrWhiteSpace($ModObj.Author)) {
375376
$ModuleMetaData.Author = $ModObj.Author
@@ -463,8 +464,9 @@ function New-MarkdownHelp
463464
if($null -ne $ModuleMetaData) {
464465

465466
$ModuleMetaData.ModuleVersion = $ModuleVersion
466-
if($null -ne $ModuleGuid -and ![string]::IsNullOrWhiteSpace($ModuleGuid.Guid)) {
467-
$ModuleMetaData.GUID = $ModuleGuid.Guid
467+
$MetaDataGuid = $ModuleGuid.ToString()
468+
if(![string]::IsNullOrWhiteSpace($MetaDataGuid)) {
469+
$ModuleMetaData.GUID = $MetaDataGuid
468470
}
469471
if(![string]::IsNullOrWhiteSpace($ModObj.Author)) {
470472
$ModuleMetaData.Author = $ModObj.Author

0 commit comments

Comments
 (0)