![]() | U.S. Roads: Alaska Project‑class | |||||||||||
|
![]() | Alaska Project‑class | ||||||
|
Morriswa: You may already know about this, but this template is generating
misnested tags and
stripped tags
lint errors. For example, in
Wikipedia:WikiProject U.S. Roads/Redirects/Alaska, *{{/Route list|98}}
expands to *{{Wikipedia:WikiProject U.S. Roads/Redirects/Alaska/Route list|98}}
, which expands to
*<small>[[File:Alaska 98 shield.svg|25x20px]] </span> <span>[[Alaska Route 98]] [[Route 98 (Alaska)]] [[Alaska State Highway 98]] [[Alaska State Route 98]]</span> [[List of highways numbered 98|disambiguation]] </small>
If not for the asterisk, <small>...</small>
would be OK, but because of the asterisk, the opening <small>
is within a <li>...</li>
generated by the asterisk, while the closing </small>
is outside <li>...</li>
. This can be fixed either by moving the <small>
to start on the line after the file(s), or by removing all of the line breaks. The stripped </span>
at the end of the first line is obvious in this case; the code will have to be rewritten to tighten the matching of opening and closing <span>...</span>
tags. —
Anomalocaris (
talk)
23:04, 18 March 2021 (UTC)
And, of course, whatever fix you do here should be propagated to similar "Templates" in the Wikipedia namespace you have created. — Anomalocaris ( talk) 23:11, 18 March 2021 (UTC)
Morriswa: Thank you for replying so quickly! I didn't guess that you simply copied code from other "templates" created by other Wikipedia editors. Which template was the source of this markup? Just let me know that and I'll take it from there. As for lint, yes, this is a real issue in Wikipedia. Some lint errors don't matter very much, but markup with misnested tags might not do what you expect. For example, the markup
[[The Beatles|<small>A popular British music group]] that wrote "[[I Want to Hold Your Hand]]"</small>
has a missing end tag for the opening <small>
inside the wikilink and a stripped closing </small>
at the end. Perhaps the author actually intended one of these:
<small>[[The Beatles|A popular British music group]] that wrote "[[I Want to Hold Your Hand]]"</small>
[[The Beatles|<small>A popular British music group</small>]] that wrote "[[I Want to Hold Your Hand]]"
[[The Beatles|A popular British music group]] <small>that wrote "[[I Want to Hold Your Hand]]"</small>
By careful placement of tags, one avoids lint errors and there is no doubt what one intended. — Anomalocaris ( talk) 23:54, 18 March 2021 (UTC)
![]() | U.S. Roads: Alaska Project‑class | |||||||||||
|
![]() | Alaska Project‑class | ||||||
|
Morriswa: You may already know about this, but this template is generating
misnested tags and
stripped tags
lint errors. For example, in
Wikipedia:WikiProject U.S. Roads/Redirects/Alaska, *{{/Route list|98}}
expands to *{{Wikipedia:WikiProject U.S. Roads/Redirects/Alaska/Route list|98}}
, which expands to
*<small>[[File:Alaska 98 shield.svg|25x20px]] </span> <span>[[Alaska Route 98]] [[Route 98 (Alaska)]] [[Alaska State Highway 98]] [[Alaska State Route 98]]</span> [[List of highways numbered 98|disambiguation]] </small>
If not for the asterisk, <small>...</small>
would be OK, but because of the asterisk, the opening <small>
is within a <li>...</li>
generated by the asterisk, while the closing </small>
is outside <li>...</li>
. This can be fixed either by moving the <small>
to start on the line after the file(s), or by removing all of the line breaks. The stripped </span>
at the end of the first line is obvious in this case; the code will have to be rewritten to tighten the matching of opening and closing <span>...</span>
tags. —
Anomalocaris (
talk)
23:04, 18 March 2021 (UTC)
And, of course, whatever fix you do here should be propagated to similar "Templates" in the Wikipedia namespace you have created. — Anomalocaris ( talk) 23:11, 18 March 2021 (UTC)
Morriswa: Thank you for replying so quickly! I didn't guess that you simply copied code from other "templates" created by other Wikipedia editors. Which template was the source of this markup? Just let me know that and I'll take it from there. As for lint, yes, this is a real issue in Wikipedia. Some lint errors don't matter very much, but markup with misnested tags might not do what you expect. For example, the markup
[[The Beatles|<small>A popular British music group]] that wrote "[[I Want to Hold Your Hand]]"</small>
has a missing end tag for the opening <small>
inside the wikilink and a stripped closing </small>
at the end. Perhaps the author actually intended one of these:
<small>[[The Beatles|A popular British music group]] that wrote "[[I Want to Hold Your Hand]]"</small>
[[The Beatles|<small>A popular British music group</small>]] that wrote "[[I Want to Hold Your Hand]]"
[[The Beatles|A popular British music group]] <small>that wrote "[[I Want to Hold Your Hand]]"</small>
By careful placement of tags, one avoids lint errors and there is no doubt what one intended. — Anomalocaris ( talk) 23:54, 18 March 2021 (UTC)