Skip to content

Commit

Permalink
fix: Template.HTML.Element Attribute Fix ( Fixes #972 )
Browse files Browse the repository at this point in the history
  • Loading branch information
James Brundage committed Mar 19, 2024
1 parent 51deee8 commit 60c4043
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Languages/HTML/Templates/Syntax/HTML-Template-Element.ps.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ Template function HTML.Element {
)

process {
$attributesString = if ($Attributes) {
if ($attributes -is [Collections.IDictionary]) {
$attributes = [PSCustomObject]$attributes
$attributesString = if ($Attribute) {
if ($attribute -is [Collections.IDictionary]) {
$attribute = [PSCustomObject]$attribute
}
@(foreach ($property in $attributes.PSObject.Properties) {
@(foreach ($property in $attribute.PSObject.Properties) {
$propertyName = $property.Name -replace '([A-Z])', '-$1' -replace '^-', ''
$propertyValue = $property.Value
if ($propertyValue -is [switch]) {
Expand Down

0 comments on commit 60c4043

Please sign in to comment.