diff options
author | Minteck <contact@minteck.org> | 2022-01-20 13:43:34 +0100 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-01-20 13:43:34 +0100 |
commit | c2aa7bf38fb30de2d04f87f8e7780e4c768ae6b1 (patch) | |
tree | 226598e8d17d20e3721358f7c60b1cc6b851163a /node_modules/.bin/markdown-it.ps1 | |
download | cobalt-c2aa7bf38fb30de2d04f87f8e7780e4c768ae6b1.tar.gz cobalt-c2aa7bf38fb30de2d04f87f8e7780e4c768ae6b1.tar.bz2 cobalt-c2aa7bf38fb30de2d04f87f8e7780e4c768ae6b1.zip |
Initial commit
Diffstat (limited to 'node_modules/.bin/markdown-it.ps1')
-rw-r--r-- | node_modules/.bin/markdown-it.ps1 | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/node_modules/.bin/markdown-it.ps1 b/node_modules/.bin/markdown-it.ps1 new file mode 100644 index 0000000..7f223fc --- /dev/null +++ b/node_modules/.bin/markdown-it.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../markdown-it/bin/markdown-it.js" $args + } else { + & "$basedir/node$exe" "$basedir/../markdown-it/bin/markdown-it.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../markdown-it/bin/markdown-it.js" $args + } else { + & "node$exe" "$basedir/../markdown-it/bin/markdown-it.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret |