Skip to content

Commit 2ba4a6e

Browse files
StartAutomatingStartAutomating
StartAutomating
authored and
StartAutomating
committed
feat: openEmbedding.get_Markdown ( Fixes #14 )
Only linking an image if we have an image
1 parent 60aebe6 commit 2ba4a6e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

oEmbed.types.ps1xml

+6-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,12 @@
3838
<ScriptProperty>
3939
<Name>Markdown</Name>
4040
<GetScriptBlock>
41-
"[![$($this.title)]($($this.thumbnail_url))]($($this.url))"
41+
if ($this.thumbnail_url) {
42+
return "[![$($this.title)]($($this.thumbnail_url))]($($this.url))"
43+
}
44+
elseif ($this.title) {
45+
"[$($this.title)]($($this.url))"
46+
}
4247
</GetScriptBlock>
4348
</ScriptProperty>
4449
</Members>

0 commit comments

Comments
 (0)