Powershell syntax highlighting for your blog or website
I've added a Powershell syntax file to my online HTML syntax highlighter.
You can now produce this kind of thing:
You can play with the Beta highlighter here.
You can now produce this kind of thing:
- # Factorial
- # Syntax File Demo
- # Simon Hudson 14/10/2006 - 17/7/2007
- param([string]$num)
- if (-not $num)
- {
- "Factorial PowerShell Demo"
- "========================="
- Write-Output "Usage:`n`tfactorial <number>"
- return
- }
- function factorial([int]$x)
- {
- if ($x -eq 1)
- { return 1 }
- else
- { return $x * (factorial ($x - 1)) }
- }
- factorial $num
You can play with the Beta highlighter here.
Comments
cheers...^^