Template talk:Seealso: Difference between revisions
(Created page with "== Change from {{param|1|}} to named parameter 1={{param|1}} == The edit from <code>| {{param|1|}}</code> to <code>| 1 = {{param|1|}}</code> broke lists/enumerations, see the (currently) broken doc, such as: <pre> {{Seealso| * one * two }} </pre> This currently renders as: {{Seealso| * one * two }} It seems to me that the wikitext parser handles * and # in a way that they must be at the ''very'' beginning of a new line to generate an (un)ordered list in the HTML, which d...") |
|||
| Line 8: | Line 8: | ||
</pre> | </pre> | ||
This currently renders as: | This currently renders as: | ||
<i><div><span style="color:#bbb; display:table-cell; font-weight:0; padding-left:1.6em; white-space:nowrap;">See also: </span><span style="display:table-cell; padding:0.2em;">* one | |||
* one | <ul><li>two</li></ul></span></div></i> | ||
It seems to me that the wikitext parser handles * and # in a way that they must be at the ''very'' beginning of a new line to generate an (un)ordered list in the HTML, which doesn't happen when a named parameter (1=) is used here: the first item ends up not being part of the list. I'd rather suggest staying with <code>|{{param|1|}}</code> to remove that one unintended space at least. I don't know a better solution that keeps lists intact and I remember that I used this approach among several templates and I am not happy about that not-so-clean solution. I yet haven't seen the trimming be a problem, but lists. And no, I didn't look through all use cases of {{tlc|Seealso}} whether there are problems on actual pages – if there are no problems, I don't mind. --[[User:Popcorn|popcorn]] ([[User talk:Popcorn|talk]]) 18:06, 4 November 2025 (PST) | It seems to me that the wikitext parser handles * and # in a way that they must be at the ''very'' beginning of a new line to generate an (un)ordered list in the HTML, which doesn't happen when a named parameter (1=) is used here: the first item ends up not being part of the list. I'd rather suggest staying with <code>|{{param|1|}}</code> to remove that one unintended space at least. I don't know a better solution that keeps lists intact and I remember that I used this approach among several templates and I am not happy about that not-so-clean solution. I yet haven't seen the trimming be a problem, but lists. And no, I didn't look through all use cases of {{tlc|Seealso}} whether there are problems on actual pages – if there are no problems, I don't mind. --[[User:Popcorn|popcorn]] ([[User talk:Popcorn|talk]]) 18:06, 4 November 2025 (PST) | ||
Revision as of 18:09, 4 November 2025
Change from {{{1|}}} to named parameter 1={{{1}}}
The edit from | {{{1|}}} to | 1 = {{{1|}}} broke lists/enumerations, see the (currently) broken doc, such as:
{{Seealso|
* one
* two
}}
This currently renders as:
- two
It seems to me that the wikitext parser handles * and # in a way that they must be at the very beginning of a new line to generate an (un)ordered list in the HTML, which doesn't happen when a named parameter (1=) is used here: the first item ends up not being part of the list. I'd rather suggest staying with |{{{1|}}} to remove that one unintended space at least. I don't know a better solution that keeps lists intact and I remember that I used this approach among several templates and I am not happy about that not-so-clean solution. I yet haven't seen the trimming be a problem, but lists. And no, I didn't look through all use cases of {{Seealso}} whether there are problems on actual pages – if there are no problems, I don't mind. --popcorn (talk) 18:06, 4 November 2025 (PST)