Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/LogicApp.Doc.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Document 'Azure-LogicApp-Documentation' {
$Json
)

(($Json -replace '^{', '<pre>{') -replace '}$', '}</pre>') -replace '\r\n', '<br>'
(($Json -replace '^{', '<code>{') -replace '}$', '}</code>') -replace '\r\n', '<br>'
}

"# Azure Logic App Documentation - $($InputObject.LogicApp.name)"
Expand All @@ -34,8 +34,8 @@ $($InputObject.diagram)
Section 'Actions' {
$($InputObject.actions) |
Sort-Object -Property Order |
Select-Object -Property 'ActionName', 'Type', 'RunAfter', @{Name = 'Inputs'; Expression = { Format-MarkdownTableJson -Json $($_.Inputs | ConvertFrom-Json | ConvertTo-Json -Depth 10) } } |
Table -Property 'ActionName', 'Type', 'RunAfter', 'Inputs'
Select-Object -Property 'ActionName', 'Comment', 'Type', 'RunAfter', @{Name = 'Inputs'; Expression = { Format-MarkdownTableJson -Json $($_.Inputs | ConvertFrom-Json | ConvertTo-Json -Depth 10)} } |
Table -Property 'ActionName', 'Comment', 'Type', 'RunAfter', 'Inputs'
}
}

Expand All @@ -50,4 +50,4 @@ $($InputObject.diagram)
}
}
}
}
}
14 changes: 12 additions & 2 deletions src/New-LogicAppDoc.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ Param(
[string]$LogicAppName,

[Parameter(Mandatory = $false)]
[string]$OutputPath = (Get-Location).Path
[string]$OutputPath = (Get-Location).Path,

[Parameter(Mandatory = $false)]
[switch]$replaceU0027
)

Set-StrictMode -Version 3.0
Expand Down Expand Up @@ -244,4 +247,11 @@ $invokePSDocumentSplat = @{
}
$markDownFile = Invoke-PSDocument @invokePSDocumentSplat
Write-Host ('Logic App Workflow Markdown document is being created at {0}' -f $($markDownFile.FullName)) -ForegroundColor Green
#endregion
#endregion

#region replace \u0027 with ' in Markdown documentation for Logic App Workflow
if($replaceU0027){
$pathToDocumentationFile = ($OutputPath + $LogicAppName + ".md")
$documentationFileData = Get-Content -Path $pathToDocumentationFile
$documentationFileData -replace '\\u0027' , "'" | set-content -path $pathToDocumentationFile
}