Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
leojonathanoh committed Jul 11, 2023
1 parent 06ac496 commit d430d98
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions ConvertOneNote2MarkDown-v2.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1168,19 +1168,23 @@ Function Convert-OneNotePage {
$pageCfg['conversion']
'-i'
if ($pageCfg['docxExportFilePath'] -match ' ') {
"`"$( $pageCfg['docxExportFilePath'] )`""
"`"$( $pageCfg['docxExportFilePath'] )`"" # Add double-quotes to path containing spaces
}else {
$pageCfg['docxExportFilePath']
}
'-o'
if ($pageCfg['filePathNormal'] -match ' ') {
"`"$( $pageCfg['filePathNormal'] )`""
"`"$( $pageCfg['filePathNormal'] )`"" # Add double-quotes to path containing spaces
}else {
$pageCfg['filePathNormal']
}
'--wrap=none'
'--markdown-headings=atx'
"--extract-media=$( $pageCfg['mediaParentPathPandoc'] )"
if ($pageCfg['mediaParentPathPandoc'] -match ' ') {
"`"--extract-media=$( $pageCfg['mediaParentPathPandoc'] )`"" # Add double-quotes to path containing spaces
}else {
"--extract-media=$( $pageCfg['mediaParentPathPandoc'] )"
}
)
"Command line: pandoc.exe $argumentList" | Write-Verbose
$process = Start-Process -ErrorAction Stop -RedirectStandardError $stderrFile -PassThru -NoNewWindow -Wait -FilePath pandoc.exe -ArgumentList $argumentList # extracts into ./media of the supplied folder
Expand Down

0 comments on commit d430d98

Please sign in to comment.