Template talk:EL table row
Extra vertical space
editThis is generating excess newlines in certain cases, which disrupts the display of the col 2 cell in the subsequent line, making it taller. This seems to happen when the line above is not rendered (per design) when the category does not exist, but a blank line is inserted into the table before the next |-
row tag. But not every time; in the example below, only the last row manifests the bug. This may be due to some squirrely interaction between wiki table markup, and escaped vertical bar ({{!}}
. One certain way to fix this is to switch the table to Html markup, as the end tags will take care of that problem, but since wiki markup is standard here, I'd like to keep that, if I can figure out how to make it work.
Demonstrate the problem
| ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{| class="wikitable" |- ! value !! topic {{EL table row|Italian|bio}} {{EL table row|Italian|cult}} {{EL table row|Italian|geo}} {{EL table row|Italian|gov}} {{EL table row|Italian|hist}} {{EL table row|Italian|mil}} {{EL table row|Italian|sci}} {{EL table row|Italian|sport}} {{subst:EL table row|Italian|struct}} {{subst:EL table row|Italian|tech}} {{subst:EL table row|Italian|transport}} |}
The fewer the subcats that are actually in use for a given language, the "worse" the problem; see for example, Template:Expand Catalan. |
Thanks, Mathglot (talk) 02:47, 28 April 2021 (UTC)
- This was occurring, I think, because of two-level transclusion inside a conditional parser function. Even if there's a tricky way of resolving it (such as encoding something so it unpacks as "
{{!}}-
" *after* the first transclusion, it's not worth it. So, html. Mathglot (talk) 04:15, 28 April 2021 (UTC)
Retest after the update to html:
Fixed.
| |||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Working now, transcludable within parser functions, and the excess white-space problem has disappeared — Preceding unsigned comment added by Mathglot (talk • contribs) 06:12, 28 April 2021 (UTC)
Missing arg test
editThe code for 'missing arg2' in every switch condition is probably overkill, and could either be removed, or factored out to test it for it once at the top. Mathglot (talk) 19:24, 28 April 2021 (UTC) Done Mathglot (talk) 06:24, 29 April 2021 (UTC)