• texnic

    (@texnic)


    Hi!

    Can anyone tell me, how I can use my regex to highligh words?

    For example:

    New-NetFirewallRule -DisplayName “SQLServer Browser service” -Direction Inbound -LocalPort 1434 -Protocol UDP -Action Allow

    I want to highligh “-DisplayName” “-Direction” and so on with my color. I can highligh these expressions whith Regex (\s-\w+)

    I guess need to edit this file https://github.com/EnlighterJS/EnlighterJS/blob/master/src/lang/powershell.js

    What I have to do for this?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Andi Dittrich

    (@andi-dittrich)

    it’s the correct file. just add your custom regex rules and run the build script. finally replace the enlighterjs.min.js file and purge the cache

    Thread Starter texnic

    (@texnic)

    Thank you!

    Thread Starter texnic

    (@texnic)

    Oh, one more question, please.

    How I can highligh words like Inbond and Allow?

    Plugin Author Andi Dittrich

    (@andi-dittrich)

    same file, copy the keyword regex or customize it

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Powershell Syntax Highlighting’ is closed to new replies.