diff --git a/src/out-html-template.ps1 b/src/out-html-template.ps1
index 2420d94..ce59f6f 100644
--- a/src/out-html-template.ps1
+++ b/src/out-html-template.ps1
@@ -3,15 +3,17 @@
@@ -125,8 +127,8 @@ $commandsHelp | % {
$syn = FixString($_.synopsis)
if(!($syn).StartsWith($(FixString($_.Name)))){
@"
-
$syn
- $(FixString(($_.Description | out-string).Trim()) $true)
+ $(Convert-MdToHtml $syn)
+ $(Convert-MdToHtml $_.Description )
"@
}
@"
@@ -186,7 +188,7 @@ $commandsHelp | % {
| -$(FixString($_.Name)) |
$(FixString($_.Aliases)) |
- $(FixString(($_.Description | out-string).Trim()) $true) |
+ $(Convert-MdToHtml $_.Description ) |
$(FixString($_.Required)) |
$(FixString($_.PipelineInput)) |
$(FixString($_.DefaultValue)) |
@@ -241,8 +243,8 @@ $commandsHelp | % {
$_.examples.example | % {
@"
$(FixString($_.title.Trim(('-',' '))))
-$(FixString($_.code | out-string ).Trim())
- $(FixString($_.remarks | out-string ).Trim())
+ $(FixString($_.code | out-string ).Trim())
+ $(Convert-MdToHtml $_.remarks )
"@
}
@"
diff --git a/src/psDoc.ps1 b/src/psDoc.ps1
index 78183a2..f651f8f 100644
--- a/src/psDoc.ps1
+++ b/src/psDoc.ps1
@@ -19,6 +19,11 @@ function FixString ($in = '', [bool]$includeBreaks = $false){
function Update-Progress($name, $action){
Write-Progress -Activity "Rendering $action for $name" -CurrentOperation "Completed $progress of $totalCommands." -PercentComplete $(($progress/$totalCommands)*100)
}
+
+function Convert-MdToHtml ($unfixedString){
+ $(ConvertFrom-Markdown -InputObject (FixString(($unfixedString | out-string).Trim())) | Select-Object -exp html)
+}
+
$i = 0
$commandsHelp = (Get-Command -module $moduleName) | get-help -full | Where-Object {! $_.name.EndsWith('.ps1')}