Mediawiker icon indicating copy to clipboard operation
Mediawiker copied to clipboard

How to change Syntax highlighting for named parameters?

Open SavageAlien opened this issue 1 year ago • 1 comments

Hello. I have a question about editing the syntax highlighting. Would it be technically possible to have the syntax highlighting work for named parameters even when they are not touching the equals symbol (=) but are still followed by one. Currently, it is required that they touch for the names to be styled.

If so, how would this be setup?

This would be beneficial in a lot of scenarios, such as when you have parameters on their own new-lines and you wish to line them up by using indentation.

image

SavageAlien avatar Oct 05 '24 21:10 SavageAlien

I'll include this in next release, but as temp. solution you can change syntax file:

  • {sublime-folder}/Data/Packages/Mediawiker/MediawikiNG.sublime-syntax, line 1410
- match: '(\|)\s*(([\w\-]+)(=))?'

change to

- match: '(\|)\s*(([\w\-]+)\s*(=)\s*)?'

tosher avatar Oct 06 '24 12:10 tosher