Template talk:Swatch inline

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
WikiProject iconColor Template‑class
WikiProject iconThis template is supported by WikiProject Color, a project that provides a central approach to color-related subjects on Wikipedia. Help us improve articles to good and 1.0 standards; visit the wikiproject page for more details.
TemplateThis template does not require a rating on Wikipedia's content assessment scale.
Inline Templates
This template is within the scope of WikiProject Inline Templates, a collaborative effort to improve and manage Wikipedia's inline footnote, cleanup and dispute templates. If you would like to participate, you can visit the project page, where you can join the project and see a list of open tasks.
Some discussion of this template may take place at the project's talk page, rather than here.

Wp's templates are broken[edit]

They loop too easily after too many short edits, even when there is no self-referring. And after I nestd the span tag in the code, the hex input no longer made a numeral list until I refreshd the template off another page and here, and for no reason the list was back. Also, the one-parameter template had three span tags, also for no reason, whereas the three-parameter template with the gold input had two tags, as I'd expect. After the list was back, every line had only two tags. Now they hav one!—it looks like the templates refresh after every two edits or so. -lysdexia 16:15, 21 June 2007 (UTC)[reply]

Okay, cool, I can purge Wikipedia's cache. -lysdexia 18:42, 21 June 2007 (UTC)

Second example broken[edit]

RexxS, your changes appear to have broken the second example in the documentation. I tried to fix it in the sandbox, but it keeps wrapping to a new line no matter what I try. I don't know why. Some string processing may be needed, or something. – Jonesey95 (talk) 10:54, 14 February 2019 (UTC)[reply]

@Jonesey95: the template was broken when I found it. It displayed {{{2}}} if you omitted the second parameter. Check Special:Permalink/864363516. That was fixed by using {{{2|}}}, but the newline then appeared when a colour triple was used. I created the sandbox to try to fix the newline, but I had no success either. I think there is a genuine bug there. I expect I'll have to use Lua to solve it. --RexxS (talk) 11:43, 14 February 2019 (UTC)[reply]
RexxS: Yeah, that's no good either. The weird part is that it should work.
<span style="background-color:#00FF00">#00FF00</span> works: #00FF00
What is the if statement, or the wiki parser, doing that it should not be doing? Anyway, I always learn something by clicking around from Template:Trim, and today was no exception. I have implemented an egregious kludge that appears to work, using Template:Replace. I feel like I need to take a shower now. – Jonesey95 (talk) 13:10, 14 February 2019 (UTC)[reply]
Well done! even if it feels dirty, it's at least working. Somewhere inside the code, the wiki-parser is looking for # at the beginning of a line to change to an ordered list, and it's mistaking the output of the template as the start of a new line when it's delivered by the #if test. I no longer have the mental fortitude to go looking to debug that. --RexxS (talk) 14:05, 14 February 2019 (UTC)[reply]