We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 701b121 commit f8e2670Copy full SHA for f8e2670
1 file changed
Types/OpenXML.Word.Table/get_Markdown.ps1
@@ -0,0 +1,22 @@
1
+<#
2
+.SYNOPSIS
3
+ Gets Word Tables as Markdown
4
+.DESCRIPTION
5
+ Gets a Word Table in Markdown
6
+#>
7
+
8
+$isFirst = $true
9
+@(foreach ($row in $this.tr) {
10
+ '|' + (@(
11
+ foreach ($column in $row.tc) {
12
+ $column.InnerText -replace '(?>\r\n|\n)', '<br/>'
13
+ $columnNumber++
14
+ }
15
16
+ ) -join '|') + '|'
17
18
+ if ($isFirst) {
19
+ $isFirst = $false
20
+ "|" + ("-|" * ($row.tc.Count))
21
22
+}) -join [Environment]::NewLine
0 commit comments