Skip to content

Commit 2fec11c

Browse files
feat: OpenXML.Word.Code.get_Markdown ( Fixes #56 )
1 parent 8635f50 commit 2fec11c

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<#
2+
.SYNOPSIS
3+
Gets Code Markdown
4+
.DESCRIPTION
5+
Gets Word Code blocks as Markdown
6+
#>
7+
param()
8+
@(foreach ($run in $this.r) {
9+
$runText = $run.t
10+
if ($runText -isnot [string]) {
11+
$runText = $run.t.InnerText
12+
}
13+
'```' +
14+
[Environment]::NewLine +
15+
$runText +
16+
[Environment]::NewLine +
17+
'```'
18+
}) -join '' -replace '`{6}'

0 commit comments

Comments
 (0)