Created
October 8, 2016 14:41
-
-
Save Descalon/ba922c8636790f6d0ad3852dbdf01981 to your computer and use it in GitHub Desktop.
Powershell formatting rules
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let rules: [RegExp,string][] = [ | |
[/\bbegin\b/ig, 'Begin'], | |
[/\bbreak\b/ig, 'Break'], | |
[/\bcatch\b/ig, 'Catch'], | |
[/\bcontinue\b/ig, 'Continue'], | |
[/\bdata\b/ig, 'Data'], | |
[/\bdo\b/ig, 'Do'], | |
[/\bdynamicparam\b/ig, 'DynamicParam'], | |
[/\belse\b/ig, 'Else'], | |
[/\belseif\b/ig, 'Elseif'], | |
[/\bend\b/ig, 'End'], | |
[/\bexit\b/ig, 'Exit'], | |
[/\bfilter\b/ig, 'Filter'], | |
[/\bfinally\b/ig, 'Finally'], | |
[/\bfor\b/ig, 'For'], | |
[/\bforeach\b/ig, 'ForEach'], | |
[/\bfrom\b/ig, 'From'], | |
[/\bfunction\b/ig, 'Function'], | |
[/\bif\b/ig, 'If'], | |
[/\bin\b/ig, 'In'], | |
[/\binlinescript\b/ig, 'InlineScript'], | |
[/\bhidden\b/ig, 'Hidden'], | |
[/\bparallel\b/ig, 'Parallel'], | |
[/\bparam\b/ig, 'Param'], | |
[/\bprocess\b/ig, 'Process'], | |
[/\breturn\b/ig, 'Return'], | |
[/\bsequence\b/ig, 'Sequence'], | |
[/\bswitch\b/ig, 'Switch'], | |
[/\bthrow\b/ig, 'Throw'], | |
[/\btrap\b/ig, 'Trap'], | |
[/\btry\b/ig, 'Try'], | |
[/\buntil\b/ig, 'Until'], | |
[/\bwhile\b/ig, 'While'], | |
[/\bworkflow\b/ig, 'Workflow'], | |
[/\t/g, " "], | |
[/\n\s*({)\n/g, "$1\n"], | |
[/([^\s])(\()/g, "$1 $2"], | |
[/(\))([^\s])/g, "$1 $2"], | |
[/(\})([^\s])/g, "$1 $2"], | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment