Board Thread:Site-Related Tasks/@comment-3020860-20181028070047/@comment-3020860-20181029073507

AnnabellRice wrote: Any thoughts on getting secondary title category links to autogenerate without having to delete the space after each semicolon on every staff article? I'll take a look. I'm sort of surprised that is necessary, since parser functions generally strip whitespace — in fact, MediaWiki have a whole raft of templates specifically coded to preserve the whitespace that would otherwise be stripped out.

There are some edge cases, though, where whitespace is preserved. If we're hitting one of those, switching the form of how we access the parameters might work, or a simple  implementation could be wrapped around them to remove the whitespace.

Trim is a pretty simple template, MediaWiki's own implementation is just:""But there are some caveats regarding when and how it can be used, so I can't say for certain it's the solution in this instance. But I'll experiment in my user space and let you know if I come up with anything.

(As a random aside, it sure would be helpful for testing purposes if Special:ExpandTemplates was available on the wiki. Using Wikipedia's works for basic code testing, but at some point you need to test against the parser, extensions, and templates actually present on the target codebase.)