tosher / Mediawiker

A plugin for Sublime Text editor that adds possibility to use it as Wiki Editor on MediaWiki-based sites like Wikipedia and many other.
Other
137 stars 27 forks source link

How to change Syntax highlighting for named parameters? #204

Open SavageAlien opened 1 month ago

SavageAlien commented 1 month ago

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

tosher commented 1 month ago

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

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

change to

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