Topic on Extension talk:Linter

Issue: Different rendering of list not detected

4
Summary by SSastry (WMF)

We have a miscellanous issues category, but it isn't populated yet. At this point, our primary focus is on non-edge-case scenarios. So, we aren't prioritizing this. Feel free to open a phab ticket against linter for these misc. cases.

197.218.83.254 (talkcontribs)

Steps to reproduce

  1. Paste the following code on a page
<ol> uuuu</ol>

Expected output

<ol> uuuu</ol>

Or

<p> uuu</p>

Actual

<div style="margin-left: 2em">uuuu</div>

Worse rendering:

<ol> uuuu
<li> zzz</li>
</ol>

Output

<ol>
<li style="list-style: none">uuuu</li>
<li>zzz</li>
</ol>

That div thing is pretty odd, the newer parser seems to output it in a better way. Although it might be best to simply remove the ol tags in such cases.

SSastry (WMF) (talkcontribs)

There are probably several edge cases like this which we probably won't try to detect and report exhaustively. The high priority linter categories detect patterns that are in common use on wikis and would break.

197.218.83.254 (talkcontribs)

Makes sense, it might be right that it might not be worth the effort. The newer tool handles it quite well.

In general though, it might make sense to have a catch all linter category: "Invalid html". That way every other low priority item that doesn't fit elsewhere might be simply thrown in there. That's probably worth the effort as new html tags may be whitelisted, and a general parser may simply detect them and put them there with lower effort from developers.

Since there will eventually be a need to update the html library / validator.

197.218.83.254 (talkcontribs)

P.S. Fun fact:

<ol type=a />

The above renders nothing in the older cleanup tool, but shows a nice "a." in the newer one.