Board Thread:Support Requests - Getting Technical/@comment-24916335-20161104052957/@comment-24931587-20161105184343

It's easy enough if you know the length of the longest parameter name. It requires two rules. The first rule adds more spaces than you need: Find: ^ *\|[ \t]*(\w+)[ \t]*= Replace: | $1                                   =

The second rule removes any spaces between the Nth character and the "=": Find: ^(\| [^\n=]{12}\w*) *= Replace: $1 =

(This assumes your longest parameter name is 12 characters.)

Both rules should be set to Type = "Inside templates" and have the "Regular expression" and "Multiline" options checked. You should run it manually for at least a few pages to test whether it's working properly.

Note that this will reformat all multiline templates on the page, and will put the "=" in the same column for all of them even if one template doesn't need that much space.

I think I could write a smarter bot that would figure out which column the "=" should be in for each template, instead of using a hard-coded number for all templates, but it'd be a lot more complicated and require careful testing.