Skip to content

Conversation

@smasterson
Copy link
Contributor

This fixes #516 a regression was identified where New-TablePercentageBar with conditional formatting rendered as a string and/or produced invalid JS.

Changes:
New-TablePercentageBarInternal.ps1:
Use ConvertTo-Json -Compress for conditional formatting so the render call doesn’t span multiple lines.

New-HTMLTable.ps1:
Replace the percentBar unquoting logic with a regex replacement that:
unquotes the render call
unescapes JSON quotes (")
converts \u0027 to ' so the JS parses correctly.

Result:
percentBar(...) render function is emitted as valid JS and the bars render again.

Not going to pretend that Codex didn't hunt this down and suggest the fix. I tested it myself in a few large dashboards and it seems to fix the issue with no ill side affects.

@PrzemyslawKlys
Copy link
Member

Codex is King :-)

@PrzemyslawKlys PrzemyslawKlys merged commit 07aad52 into EvotecIT:master Dec 29, 2025
4 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New-TablePercentageBar - Seems to have broken at 1.14.0

2 participants