Page MenuHomePhabricator

Code pages exceeding byte size limits for highlighting should be tracked with a category
Open, Needs TriagePublicFeature


Feature summary:
The extension's page on states the following:

The category may also be added, and the content will not be highlighted, if there are more than 1000 lines or more than 100 kB text.

While this behaviour is true for the syntaxhighlight tag, it is not for CSS and JS pages, where highlighting is simply not invoked if the byte limit condition isn't met and no indication is left beside, obviously, the lack of highlighting. Code pages shouldn't be exempted.


  • Tracking for pages affected by T104109
  • Indication the syntax highlighter didn't run due to an error and not just on a whim.

Event Timeline

Change 852305 had a related patch set uploaded (by Alex44019; author: Alex44019):

[mediawiki/extensions/SyntaxHighlight_GeSHi@master] Add code pages exceeding byte limit to error category

In general, this is going to 'pollute' a category which can/should theoretically be cleaned up, with all kinds of pages that are very unlikely to be cleaned up.

Is that desirable ? What are people going to do with these pages ? Do we need a separate category perhaps ?

IMO, it would provide some clarity on why a code page was not being styled instead of it just not working.

Perhaps a text notice could be sufficient, just to give that reason why a page has no highlighting. "Code syntax highlighting has been disabled on this page due to its size".