Open main menu

Possible fix for missing paragraph end tag and possibly incorrect closing of ifeq{self}Edit

I have edited the sandbox with a proposed change to make use of a closing /p tag that is currently ignored. I think it is ignored because the expression ifeq{self} is not properly closed. I know that this template is used in many places, in many ways, however, and the test cases page doesn't have very many cases on it, so I am wary of putting this change into production without a check from other editors.

The current template's syntax problems can be seen by putting {{db-g7}} into Special:ExpandTemplates and observing that the closing /p tag that is in the template code is not rendered in the G7 template. Viewing the template code with the Syntax Highlighter gadget also shows the problem (the /p shows up in yellow, which is an indication that something is wrong). – Jonesey95 (talk) 19:49, 31 March 2019 (UTC)

Hearing no objections, I am carefully but boldly implementing what should be a minor change. I welcome any and all trouts and reverts if I screwed something up. – Jonesey95 (talk) 19:41, 16 May 2019 (UTC)
@Jonesey95: The only screw-up I see with this edit was that it moved the "Contest this speedy deletion" button and last editor message outside the deletion tag. Jalen D. Folf (talk) 20:00, 16 May 2019 (UTC)
Thanks for your patience, everyone. I have just implemented a slightly different attempt at a fix. This one keeps the "last edited" message inside the box. – Jonesey95 (talk) 08:44, 17 May 2019 (UTC)
Looks OK. The <p>...</p> element is peculiar (compared to other HTML elements) in that although it behaves as a block element, it cannot itself contain block elements such as <div>...</div> <table>...</table>, lists etc. When you attempt to place a block element "inside" a <p>...</p>, the opening tag of the block element implicitly forces a closing </p> immediately prior to the opening tag of the "enclosed" block element. In this case, the {{#tag: inputbox | ... }} creates a <div>...</div>. --Redrose64 🌹 (talk) 14:39, 17 May 2019 (UTC)
Thanks. I know that p tags have complex behavior, and they don't seem to make a difference most of the time, so I usually leave them alone when I am cleaning up Linter errors. This one was popping up in many db-* templates, however, and it was bugging me, so I wanted to get it off the list. – Jonesey95 (talk) 15:54, 17 May 2019 (UTC)
Return to "Db-meta" page.