Stephanevg / PSHTML

Cross platform Powershell module to generate HTML markup language
https://pshtml.readthedocs.io/en/latest/
Other
168 stars 43 forks source link

Span -Content Doesn't show variable content #234

Closed Stephanevg closed 5 years ago

Stephanevg commented 5 years ago
$TotalMachineCount = 5
span -content {$($TotalMachineCount) }

Should show 5, but shows $($TotalMachineCount)

Stephanevg commented 5 years ago
$e = 3

 span -Content {$e}
<span >$e</span>

 span $e                                                      
<span >3</span>

span -Content $e
<span >3</span>

It only doesn't work when we add the '{}'

As a comparaison, it works for other tags:


p $e
<p >3</p>

 p {$e}
<p >3</p>

 img $e
<img src="3"  />
Stephanevg commented 5 years ago

Removed the [String] from the $Content parameter fixed the issue