Wikipedia talk:WikiProject U.S. Roads/Redirects/Alaska/Route list
![]() | This project page does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||||||
|
Misnested tags
editMorriswa: 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)
- Did I mess anything up? I know nothing about Lint (or is it Linter?). I just used code from other state pages and modified it for the state in question. I think I did something weird, since each entry (when it extrapolates out) should be on one line, not two. Morriswa (Charlotte Allison) (talk) 23:13, 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)
- Most of the "Wikipedia:WikiProject U.S. Roads/Redirects" pages don't actually use templates. They call the code on a subpage from that state/territory. I just copied the code from one of them. I don't remember which. All I know is that every page should have some form of uniformity and commonality. Morriswa (Charlotte Allison) (talk) 00:09, 19 March 2021 (UTC)