Pode.Web icon indicating copy to clipboard operation
Pode.Web copied to clipboard

CodeBlock loses syntax highlighting on update

Open KeithALane opened this issue 1 year ago • 0 comments

Describe the Bug

When you Update-PodeWebText a PodeWebCodeBlock it will lose the syntax highlighting

Steps To Reproduce

Update-PodeWebText -Id "UpdateBOMCommon" -Value "SELECT 'After', Name from master.sys.databases where database_id <=4 " New-PodeWebCodeBlock -id "UpdateBOMCommon" -Value "SELECT 'Before', Name from master.sys.databases where database_id <=4" -Language "SQL"

Expected Behavior

Syntax highlighting/Language should be preserved

Screenshots

20241111 - Pode Web SyntaxHighlighting1 20241111 - Pode Web SyntaxHighlighting2

Platform

  • OS: [e.g. iOS, Windows]
  • Browser: [e.g. Chrome, Safari]
  • Versions:
    • Pode: v2.9.0
    • Pode.Web: v0.8.3
    • PowerShell: v7.4.5

Additional Context

The solution for this is going to be impacted by the changes you are planning for 1.0 vs 0.8 I think fixing it in 1.0 it might be as easy as adding the language parameter to "/src/public/actions.ps1" - Update-PodeWebText but I haven't tested that yet.

KeithALane avatar Nov 12 '24 22:11 KeithALane