Merge pull request #20940 from asgerf/js/detect-minified-files

JS: Skip minified file if avg line length > 200
This commit is contained in:
Asger F
2026-01-19 14:31:09 +01:00
committed by GitHub
9 changed files with 190 additions and 7 deletions

View File

@@ -132,3 +132,103 @@
/^(([0-9])|([0-1][0-9])|([2][0-3])):?([0-5][0-9])$/g;
/^[\w-\.]+@([\w-]+\.)+[\w-]{2,3}$/g;
/(((0[1-9]|[12][0-9]|3[01])([/])(0[13578]|10|12)([/])(\d{4}))|(([0][1-9]|[12][0-9]|30)([/])(0[469]|11)([/])(\d{4}))|((0[1-9]|1[0-9]|2[0-8])([/])(02)([/])(\d{4}))|((29)(\.|-|\/)(02)([/])([02468][048]00))|((29)([/])(02)([/])([13579][26]00))|((29)([/])(02)([/])([0-9][0-9][0][48]))|((29)([/])(02)([/])([0-9][0-9][2468][048]))|((29)([/])(02)([/])([0-9][0-9][13579][26])))/g;
//
// Add some empty lines to lower the average line length so the file is not classified as minified.
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//

View File

@@ -17,7 +17,6 @@
| jquery-datatables.js:0:0:0:0 | jquery-datatables.js | library |
| jquery-jstree.js:0:0:0:0 | jquery-jstree.js | library |
| jquery-snippet.js:0:0:0:0 | jquery-snippet.js | library |
| json-like.js:0:0:0:0 | json-like.js | generated |
| jsx-old.js:0:0:0:0 | jsx-old.js | generated |
| jsx.js:0:0:0:0 | jsx.js | generated |
| multi-part-bundle.html:0:0:0:0 | multi-part-bundle.html | generated |