Page MenuHomePhabricator

Added space is not highlighted in AbuseFilter diff
Open, Needs TriagePublic

Description

https://meta.wikimedia.org/wiki/Special:AbuseFilter/history/247/diff/prev/3837 currently shows the diff like this:

AbuseFilter diff bug.png (70×1 px, 2 KB)

The added space should be highlighted like in a regular diff (random example).

Event Timeline

I think this might be a recent-ish regression caused by some core change, since AF just uses the core class for rendering the diff. It's also interesting to note that on my local checkout of MW core (which is ~1 week old), for the same diff as this one on itwp, the added space is not highlighted. I still have to investigate this more deeply though.


BTW, as it's common in programming languages, ! has higher precedence than ==, so the example above effectively evaluates to (!page_namespace) == 4, which is certainly not what you want. Using != will fix that.

Thanks, that is interesting. As for the comment on the syntax, I guess the added space was intended to fix that, but I was sceptical if it actually worked myself. Anyway, the line has now been removed, though I might forward your message to Minorax, who edited the filter.