Closed kno10 closed 7 years ago
Hi! Do I understand you correctly: You are suggesting to adopt MediaWiki's MagicWord solution? Because you said yourself that the Template:! solution seems to work...
I do not have a lot of experience yet, so I do not know what is best.
I added a manual workaround (the default expansion does ''not'' work; I added an exception instead, that instead of returning the real contents of Template:!
will return ' |' instead).
I guess other users will experience the same problem.
Thanks for the clarification. I'm not sure how the MediaWiki magic word mechanism works. I'll have to look into it. Due to the nature of the Sweble parser it will not be possible to recognize random strings as special entities without a bigger change to the parser pipeline. A quick and efficient solution would therefore be to hardcode the "{{!}}" detection in the parser code.
Fixed in version 2.2.0
See https://www.mediawiki.org/wiki/Help:Magic_words#Other
From a quick test, simply expanding
Template:!
to|
(instead of the soft-redirect that it is in Wikipedia now) appears to work.Example of usage can be found e.g. in
https://en.wikipedia.org/wiki/Template:Geobox transcluded from https://en.wikipedia.org/wiki/Balomir_River_(Cugir)