Page MenuHomePhabricator

Translate tag causes lists in tables to not render properly
Closed, InvalidPublic

Description

The translate tag messes up the rendering of lists in tables. Specifically the first and second items aren't rendered as they should. See e.g. the first table on https://www.mediawiki.org/w/index.php?title=Help:Lists&oldid=3314375. The same lists work outside of tables and I'm not sure if it's the translate tag specifically that causes.

Event Timeline

Nikerabbit subscribed.

You need to make sure the list starts on an empty line (i.e. <translate> is on its own line, not following the table syntax on the same line). It behaves the same way without <translate> tags.

I'm not sure what you mean by "It behaves the same way [...]". If I remove the translate tags it renders as expected. I tried a few different things on a test page and removing the translate tags or replacing them with other tags (table 2 and 3 respectively) worked. Adding a bunch of newlines in the head did solve it, but to me it seems a bit strange that that should matter.

||<translate>
<!--T:7-->
* ..</translate>

is the same as writing:

||* ..

The latter does not work either. <translate> tags are preprocessed before parsing step, unlike normal tags like <table> or <b>.

Ok, now I understand. I didn't realize that the translate tag ate the newlines.