Skip to content

Commit 75dada4

Browse files
author
James Brundage
committed
feat: OpenGraph.get_HTML ( Fixes #8 )
1 parent f3e45e3 commit 75dada4

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Types/OpenGraph/get_HTML.ps1

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
@(if ($this -is [Management.Automation.PSModuleInfo]) {
2+
if ($this.Description) {
3+
"<meta name='description' content='$([Web.HttpUtility]::HtmlAttributeEncode($this.Description))' />"
4+
}
5+
if ($this.PrivateData.PSData.IconUri) {
6+
7+
}
8+
} else {
9+
foreach ($property in $this.PSObject.Properties) {
10+
if ($property.Name -match ':') {
11+
"<meta property='$($property.Name)' content='$([Web.HttpUtility]::HtmlAttributeEncode($property.Value))' />"
12+
}
13+
}
14+
}) -join [Environment]::Newline

0 commit comments

Comments
 (0)