-
Suggestion
-
Resolution: Answered
-
None
NOTE: This suggestion is for Confluence Server. Using Confluence Cloud? See the corresponding suggestion.
I'd love to have some refinements to the codeblock parsing of the supported PowerShell highlighter:
- Everything between '<#' and '#>' (not counting the single hyphens) is a comment. even - or rather especially - if it spans multiple lines.
- If behind the command "New-Object" is a string with dots inbetween (like ABC.DEF.GHI), that's a .NET class. Special highlighting for that might be appropriate.
- [ABC.DEF.GHI] is another .NET specific notation
- [ABC.DEF.GHI]::Function() is calling a .NET function (or property, if called without the "()"). Highlighting those function or property-stubs separately would be great
- Functions and their parameters appear to be colored in the same color ("Select-Object -First"). I'd much appreciate if those could be varied, so that functions and parameters have similar colors (Example: Functions get a dark blue and parameters a light blue). Powershell code frequently consists of long chains of Function Pipelines with little but functions and their parameters.
- There is a way in powershell to create a string object across multiple lines: They start with '@"' and end with '"@' (without the single hyphens, but with the double ones). This is not supported in the PowerShell highlighter so far.
All those would be nice-to-have, though hardly worldshaking, features
- relates to
-
CONFCLOUD-31813 Code Block - Language: PowerShell - Refined code highlighting
- Closed