Page MenuHomePhabricator

shwiki uses unbalanced `-{` in Template:refbegin
Open, Needs TriagePublic

Description

https://sh.wikipedia.org/w/index.php?title=%C5%A0ablon%3ARefbegin&veaction=editsource
ends with

column-width: {{{colwidth|30em}}} }} }}">-{</includeonly>

which puts an unbalanced -{ in the wikitext. This is matched by }- in [[Template:refend]] presumably.

This leads to visible artifacts in the output, eg in https://sh.wikipedia.org/wiki/Mary%20Wollstonecraft%20Shelley?useparsoid=1&variant=sh-cyrl we see:

image.png (727×949 px, 427 KB)

Event Timeline

What would be a proposed solution that wouldn't trigger the language conversion? (I assume the -{ is added for this reason.) I can get it done, just need to know what should we replace it to.

Ah I think I know what you mean, it should be on the articles themselves and not get injected via the templates.

https://sh.wikipedia.org/wiki/Wikipedija:Pijaca#c-Ladsgroup-20260615023600-Incompatibility_with_Parsoid

Asked in the WP:VP to make sure people are okay with it.

Two ways we can move forward with this:

  • Create a new template like Refbegin2 and Refend2 without the extra pieces, migrate the text of basically going {{Refbegin}} to {{Refbegin2}}-{
  • Just add the -{ to articles and then remove it from the template once done.

If we create {{refbegin2}} without the -{ and define (for transition purposes) {{refbegin}} as {{refbegin2}}-{ then editors can just use {{subst:refbegin}} when they initially author the template. That also avoids "breaking" pages while the bot is running. Does that sound reasonable?

The addition of -{ to Refbegin and }- to Refend was a temporary, hacky solution, and we should avoid cementing it further into these templates. We'll be adding these to individual cite templates instead. I can remove these tags from Refbegin and Refend before then so that you can proceed with Parsoid implementation on our wiki, if you don't feel comfortable doing it yourself.