37
37
[PSCustomObject]@{
38
38
VersionRelativePath = 'foo.md'
39
39
Versions = @(
40
- @{ Version = '1.1'; ChangeType = 'N/A' }
41
- @{ Version = '1.2'; ChangeType = 'unchanged' }
42
- @{ Version = '1.3'; ChangeType = 'modified' }
40
+ @{ Version = '1.1'; ChangeType = 'N/A' }
41
+ @{ Version = '1.2'; ChangeType = 'unchanged' }
42
+ @{ Version = '1.3'; ChangeType = 'modified' }
43
43
)
44
44
}
45
45
[PSCustomObject]@{
56
56
$Summary.ToString()
57
57
```
58
58
59
- ```output
59
+ ```Output
60
60
| Version-Relative Path | 1.1 | 1.2 | 1.3 |
61
61
|:-----------------------------|:----------:|:----------:|:----------:|
62
62
| `foo.md` | N/A | Unchanged | Modified |
70
70
- The file `bar/baz.md` was added in all three versions.
71
71
72
72
The second command creates a new **StringBuilder** object to write the table to.
73
-
73
+
74
74
The third command uses this cmdlet to write a versioned content summary table to `$Summary`.
75
75
Because neither **RelativePathWidth** nor **VersionWidth** were passed to the cmdlet, it
76
- calculates the required column withs dynamically.
77
-
76
+ calculates the required column widths dynamically.
77
+
78
78
The final command displays the string the third command has built.
79
79
#>
80
80
function Add-VersionedContentTable {
@@ -99,7 +99,7 @@ function Add-VersionedContentTable {
99
99
}
100
100
}
101
101
process {
102
- # region Column Widths
102
+ # region Column Widths
103
103
if (($RelativePathWidth -eq 0 ) -and ($VersionWidth -eq 0 )) {
104
104
$RelativePathWidth , $VersionWidth = Get-VersionedContentTableColumnWidth @WidthParams
105
105
} elseif ($RelativePathWidth -eq 0 ) {
@@ -109,8 +109,8 @@ function Add-VersionedContentTable {
109
109
$WidthParams.Add (' Version' , $true )
110
110
$VersionWidth = Get-VersionedContentTableColumnWidth @WidthParams
111
111
}
112
- # endregion ColumnWidths
113
- # region Setup the table header
112
+ # endregion Column Widths
113
+ # region Setup the table header
114
114
$null = $Summary.Append (" |$ ( ' Version-Relative Path' .PadRight($RelativePathWidth )) " )
115
115
# Retrieve the list of unique versions
116
116
$VersionList = $ChangeSet.Versions.Version | Select-Object - Unique
0 commit comments