Jump to content

[bug] Styling of lists on cache pages is broken


BigFurryMonster
Followers 3

Recommended Posts

I have cache pages which have lists of items, which I created like this:
 

<ul>

<li>item 1

<li>item 2

<li>item 3
</ul>

 

This nicely worked.

 

Now, when saving my cache page after an edit, the cache editor automatically changes this to:


 

<ul>

<li>item 1

<li>item 2

<li>item 3

</li></li></li></ul><li><li><li>

 

which breaks the layout by inserting three additional bullet points.

 

Is this a glitch, or should I re-edit all my cache pages?

Link to comment
8 minutes ago, BigFurryMonster said:

Is this a glitch, or should I re-edit all my cache pages?

Yes?

 

It looks like a bug in the software the site uses to clean up the markup in cache descriptions.

 

But you may be able to work around it by doing the cleanup yourself, by adding the closing </li> tags yourself:

<ul>

<li>item 1</li>

<li>item 2</li>

<li>item 3</li>
</ul>

 

Link to comment
23 hours ago, capoaira said:

<li> tags, are tags that should be closed, so your html is wrong. The formatter/compiler expect a closing tag and try to fix it.

You sould rewreite your list like in niraD post.


hmm, not sure about whether it is required:


https://html.spec.whatwg.org/multipage/grouping-content.html#the-li-element

An li element's end tag can be omitted if the li element is immediately followed by another li element or if there is no more content in the parent element.

 

But I applied this and it indeed fixes the problem.

  • Helpful 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Followers 3
×
×
  • Create New...