Skip to content

Commit 971b327

Browse files
yotsudaclaude
andcommitted
Make internal export helper a script-scoped variable
Change _ConvertToFormat from a function to $script:ConvertToFormat scriptblock so it is not visible outside the module even when dot-sourced. Also fix missing trailing newline. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 75fecef commit 971b327

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Module/MarkdownPointer.psm1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ function Get-MarkdownPointerMCPPath {
294294
return $mcpPath
295295
}
296296

297-
function _ConvertToFormat {
297+
$script:ConvertToFormat = {
298298
# Internal: shared export logic for ConvertTo-Docx / ConvertTo-Pptx
299299
param(
300300
[string]$FilePath,
@@ -406,7 +406,7 @@ function ConvertTo-Docx {
406406
} else {
407407
[System.IO.Path]::ChangeExtension($filePath, '.docx')
408408
}
409-
_ConvertToFormat -FilePath $filePath -OutPath $outPath -Format 'docx' -Template $Template -MdpRunning $mdpRunning
409+
& $script:ConvertToFormat -FilePath $filePath -OutPath $outPath -Format 'docx' -Template $Template -MdpRunning $mdpRunning
410410
}
411411
}
412412
}
@@ -470,12 +470,12 @@ function ConvertTo-Pptx {
470470
} else {
471471
[System.IO.Path]::ChangeExtension($filePath, '.pptx')
472472
}
473-
_ConvertToFormat -FilePath $filePath -OutPath $outPath -Format 'pptx' -Template $Template -MdpRunning $mdpRunning
473+
& $script:ConvertToFormat -FilePath $filePath -OutPath $outPath -Format 'pptx' -Template $Template -MdpRunning $mdpRunning
474474
}
475475
}
476476
}
477477
}
478478

479479
New-Alias -Name mdp -Value Show-MarkdownPointer
480480

481-
Export-ModuleMember -Function Show-MarkdownPointer, Get-MarkdownPointerMCPPath, ConvertTo-Docx, ConvertTo-Pptx -Alias mdp
481+
Export-ModuleMember -Function Show-MarkdownPointer, Get-MarkdownPointerMCPPath, ConvertTo-Docx, ConvertTo-Pptx -Alias mdp

0 commit comments

Comments
 (0)