File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,9 +94,29 @@ $find_pq = fd -e pq --base-directory (gi $Config.AppRoot )
9494 $Config.AppRoot
9595)
9696filter MdFormat-EscapePath {
97+ <#
98+ . SYNOPSIS
99+ make safe markdown style links. convert paths to work as urls and console clickable urls like: <file:///{0}>'
100+ . example
101+ > 'dir\some Item.md' | MdFormat-EscapePath
102+
103+ dir/some%20Item.md
104+ #>
97105 $_ -replace ' ' , ' %20' -replace ' \\' , ' /'
98106}
99107function MdFormat-Link {
108+ <#
109+ . SYNOPSIS
110+ format a single markdown url with a name and value
111+ . EXAMPLE
112+ Pwsh> MdFormat-Link -Name 'go to' -Url 'some Item.md'
113+
114+ [go to](some Item.md)
115+
116+ MdFormat-Link -Name 'go to' -Url 'dir\some Item.md' -AlwaysEscapeUrlPath
117+
118+ [go to](dir/some%20Item.md)
119+ #>
100120 param (
101121 [Parameter (Mandatory )]
102122 [string ]$Name ,
You can’t perform that action at this time.
0 commit comments