Template incorrectly parsed when {{!}} is used
In this revision of ru:Template:Магнитогорск — Тобол {{Маршрутная карта}}'s |1= shows as \n\\CONTgq\\STR+r~~[[Однопутная система движения|↕]][[Электрификация железных дорог|нет]]~~ ~~{{rmri|L|Шаблон:Белорецк — Сибай}} на {{ст.|Сибай}}\n\\\\CONT2\\STR+c3\\~~ ~~ ~~ ~~Служебные пути ОАО «ММК»\n\\\\STRc1\\KRZ2+4u\\STRc3\n\\\\\\STR2!~STRc1\\v-STR+4!~STRc3\n\\\\\\exENDEa!~STRc1\\v-STR!~vSTR+4-\n\\\\\\ENDExa!~STRc2\\v-STR!~vSTR3-\n\\\\\\ABZg+1!~SEC1\\v-STR!~STRc4~~{{BSsplit{{!}}[[Электрификация железных дорог|нет]]{{!}}[[Переменный ток|≈]][[Электрификация железных дорог|25кВ]] instead of the much longer value in the wikitext.
Abbreviated code:
def treat_page(self):
"""Process one page."""
# Replace tags to prevent parsing issues.
text, mask = mask_html_tags(self.current_page.text)
wikicode = mwparserfromhell.parse(text, skip_style_tags=True)
for tpl in wikicode.ifilter_templates():
if tpl.name.matches('Маршрутная карта'):
for param in tpl.params:
# This is where param.value is truncated for |1=.
param_value = str(param.value)
This appears to be related to the use of the {{!}} magic word.