Commit graph

1322 commits

Author SHA1 Message Date
Translation updater bot 7dc28cee7b Localisation updates from http://translatewiki.net.
Change-Id: I50420a7ed85872ba072fffca85b02f642a727780
2013-08-18 19:41:49 +00:00
Translation updater bot 6e0fd771f4 Localisation updates from http://translatewiki.net.
Change-Id: I8727666c874f1a0393353a58fc4d68a6840fea72
2013-07-09 20:40:01 +00:00
Reedy 67b740dff6 Remove contrib directory and add gitignore to ignore it
Change-Id: I0a4bcfb54abe9d98b37d87912ee23ec17cea11ac
2013-06-15 16:36:49 +01:00
Translation updater bot 3114635614 Localisation updates from http://translatewiki.net.
Change-Id: Ied5c30b5659c25f8effba18035c81cf800b3bd85
2013-06-03 19:06:37 +00:00
Translation updater bot 610d1789bd Localisation updates from http://translatewiki.net.
Change-Id: I2f469034d0a51f97cdd2e5a4f1183c814d484f18
2013-05-10 19:56:03 +00:00
Translation updater bot 52200f561f Localisation updates from http://translatewiki.net.
Change-Id: Ia73796f6c61e4a4f86a7dbc2ce5f7ce4c7fb3241
2013-04-28 23:58:01 +00:00
Brad Jorsch f21f048443 (bug 45669) Fix highly recursive number highlighting regex
The regular expression used for number highlighting in GeSHi is highly
recursive, and easily overflows the low PCRE recursion limit on WMF
sites (and, on sites where the recursion limit isn't low, it can easily
crash PHP).

Fortunately, it's easy to fix for the common case.

This is also reported upstream at
https://sourceforge.net/p/geshi/bugs/223/

Bug: 45669
Bug: 36839
Change-Id: I27203c767d1d3f2f0999b1b1d8a06e8cf68c19ed
2013-04-09 11:58:55 -04:00
Translation updater bot 1ef3593547 Localisation updates from http://translatewiki.net.
Change-Id: I839107fd43dc0d88c2eff924007e5ecfaaeca816
2013-04-05 22:29:16 +00:00
Dereckson f976a48f37 (bug 44214) Fix bundled GeSHi library inclusion path
Currently, the SyntaxHighlight GeSHi extension includes geshi/geshi.php.

This creates a conflict when an up to date GeSHI library exists in PHP included path.

This change let the SyntaxHighlight GeSHi include our bundled version instead.

Change-Id: Ie8f9aa6182a38508201d639723e876c156d8b0d1
2013-03-06 03:40:00 +00:00
Reedy 256bd6f090 Disable Ie260c22680ec9a
Comment out new hook rather than a blanket revert

Change-Id: I58b2e0b9f485ac5bf3c38776f8d5981644ebe360
2013-03-05 20:01:08 +00:00
daniel 064fb261db Use new ContentGetParserOutput hook.
Using ContentGetParserOutput instead of ShowRawCssJs allows highliting to be applied
for other kinds of scripts as well (e.g. Lua). It also allows more special case code
for CSS and JS to be phased out.

NOTE: this requires Ibfb2cbef to be merged in core!

Change-Id: Ie260c22680ec9a31e505c685d70e17efe8a7bf44
2013-03-05 19:52:04 +00:00
Ori.livneh 0122c20452 Merge "(bug 26204) font-size is too small" 2013-02-22 23:41:19 +00:00
Ori Livneh 9fd1639d46 Disable some highlighting for MOUSs
(...modules of unusual size.)

Enabling full syntax highlighting for very long Lua modules can produce DOMs
that have hundreds of thousands of elements and cause browsers to lock up.

I took a count of spans by class (which amounts to a count of tokens by type)
of https://en.wiktionary.org/wiki/Module:languages and came up with:

       sy0:      62545 (symbols)
       br0:      61952 (brackets)
       st0:      39291 (strings)
       kw3:       7746 (keywords)
       kw1:          3
       kw2:          2
       co2:          2
       co1:          2
       nu0:          1
     ------     ------
     Total:     171544

GeSHi allows you to disable highlighting for a particular token type (see
<http://qbnz.com/highlighter/geshi-doc.html#disabling-lexics>) which like a
good way of handling this issue.

Disabling symbols (set_symbols_highlighting(false)) removes both sy0 and br0
elements from the DOM (about 124k elements in the case of Module:languages),
with about 47k elements remaining on the page. This is enough to make Chromium
responsive on my laptop (2.3ghz i5, 8 GB RAM), but it's still noticeably
sluggish. Adding 'set_string_highlighting(false);' removes another 40k elements
from the rendered output, and the resulting DOM is quite zippy at 8k elements.

Proposed solution: disable symbols highlighting when >100 kB; disable strings
highlighting too when >200 kB.

Change-Id: I90c645f9d03bbdc135058a3717a463dec40aa77d
2013-02-20 22:06:59 -08:00
Antoine Musso 6d54985ad6 (bug 26204) font-size is too small
The Geshi rendered output has a font-size of 10px where we would expect
13px just like for <pre>.

Bug 33496 against MediaWiki core dealt with that issue already: in some
(all?) browser 'monospace' has a size of 13px where as the default is
16px. When defining a font-size of 0.8em the monospace is scaled down to
10 px which is too small. By appending another font statement, the
browser treat monospace as a default font and thus scale it starting
with 16px instead of 13px.

This patch append a style to geshi which set the font-family to
"monospace, monospace" thus tricking the browser in considering
monospace a regular font.

Change-Id: I7bbdcc0a21010513473a7ca9d784df77e9920b5b
2013-02-13 22:37:00 +01:00
Translation updater bot f583c1186d Localisation updates from http://translatewiki.net.
Change-Id: I4842fd9e5a9533ee58cdb3a58aed33e643cca198
2013-01-27 17:55:33 +00:00
Translation updater bot cde3789e52 Localisation updates from http://translatewiki.net.
Change-Id: Iaee6a426fa052669baf0b7b340ca9515f081237e
2013-01-19 16:13:35 +00:00
Translation updater bot 8471d548df Localisation updates from http://translatewiki.net.
Change-Id: I9b79bee6bfc1195c3b996febf70456420870310a
2013-01-01 20:26:13 +00:00
Translation updater bot 8053c8a6dd Localisation updates from http://translatewiki.net.
Change-Id: I8e2a4028fc374e90fc93b6f7d625f5f7978f9c04
2012-12-21 20:17:06 +00:00
Translation updater bot cf72ad3467 Localisation updates from http://translatewiki.net.
Change-Id: Ie5f4085134462776dbd3d3bad26d2be2d425b50b
2012-11-11 21:01:13 +00:00
Translation updater bot 8c017a6874 Localisation updates from http://translatewiki.net.
Change-Id: Ie52aa7ad5a3d2a02b388977cdc44a333a4e07ae3
2012-10-22 01:50:01 +00:00
Translation updater bot 9ed234f1f8 Localisation updates from http://translatewiki.net.
Change-Id: Ic203174db3c5bc2a87c5e1ad54955110e9bfc3af
2012-10-02 14:00:53 +00:00
Translation updater bot ea95d133ca Localisation updates from http://translatewiki.net.
Change-Id: Ide70fcd0cf42b748ae36144d7b9c2db3fffcc7db
2012-09-15 19:54:05 +00:00
Translation updater bot 52d1bcad40 Localisation updates from http://translatewiki.net.
Change-Id: I33305c2ca0aceab8c2f5114e50cc687a170f35a5
2012-09-13 20:46:27 +00:00
Reedy da9b414aa7 So, I thought we were already on 1.8.11.....
Change-Id: Ic166d23a78d9bd8e3d0fdc5017da4aabf28dbca9
2012-09-06 01:29:53 +01:00
Derk-Jan Hartman 8d8fb22ebb (bug 39643) Allow "0" as the content of <syntaxhighlight>
The empty() function considers "0" to be empty. Makes empty() useless
for strings.

Change-Id: I798b4bb8e56951128b8f4375749d1418e2ed3b01
2012-09-04 09:51:54 +00:00
Translation updater bot d4f859df52 Localisation updates from http://translatewiki.net.
Change-Id: I7649f55347339473e3452a816cf53e60d41348f3
2012-09-01 20:47:22 +00:00
Siebrand Mazeland c602c5a4a7 Maintenance for extension SyntaxHighlight_GeSHi.
* Use Message class where possible.
* Removed superflous newlines.
* Update .gitignore.

Change-Id: Ic2386183e240662331656ebadcaad1057569fb7c
2012-08-26 11:24:29 +02:00
Reedy 2008cd18a0 Merge "Remove duplicate array key." 2012-08-20 22:12:32 +00:00
Siebrand Mazeland 4e338afca2 Remove duplicate array key.
Change-Id: I1104dbbd18a296bfa2086e12e285835237906c36
2012-08-20 16:38:33 +02:00
Reedy 86281097a1 Merge "Update geshi to the just-released GeSHi-1.0.8.11" 2012-08-20 13:02:43 +00:00
Platonides e942587f3d Update geshi to the just-released GeSHi-1.0.8.11
The two local changes to the geshi code (3d3b8186 and 95d437ca)
are already upstream.

Change-Id: I3164b060229348becfe4a3a3ff94ed5d83d7b696
2012-08-20 00:23:54 +02:00
Translation updater bot 821a80f057 Localisation updates from http://translatewiki.net.
Change-Id: Ia04bacd171a74e5fd33d2d9111d7abd987c195cc
2012-08-17 13:10:50 +00:00
Translation updater bot 88c93b51ee Localisation updates from http://translatewiki.net.
Change-Id: I272ec42b4a637ceb9396f8848c6c4c5c8b086bb8
2012-08-14 19:44:17 +00:00
Translation updater bot a95dcd885b Localisation updates from http://translatewiki.net.
Change-Id: I441fdf8a473a789f3c39b779604449de272cf314
2012-08-11 19:25:49 +00:00
Translation updater bot 561cabfcdb Localisation updates from http://translatewiki.net.
Change-Id: I9f04b0d8047ce73ddcce7a52f9d0b0b874127de2
2012-08-09 19:34:18 +00:00
Translation updater bot a51da3df57 Localisation updates from http://translatewiki.net.
Change-Id: I950b6168b8d6baf53eaa5edd106665651cde0278
2012-07-23 13:46:58 +00:00
Catrope a62433879b Shut up a PHP notice when the (css|js) expression doesn't match anything
This can happen if the TitleIsCssOrJsPage hook causes a page without a
.css or .js extension to be considered a CSS/JS page.

Change-Id: I875a7f89f683336f18e70358fe589cef706fd5d1
2012-07-18 16:33:04 -07:00
Translation updater bot dd1656c9f0 Localisation updates from http://translatewiki.net.
Change-Id: I8e1e0400bd1b957644a8bd14bd4ca5495ad1e2fb
2012-07-11 07:24:38 +00:00
Tim Starling 95d437ca0a Fix highlighting of Lua long strings
The \1 was interpreted as a PHP escape sequence, not a backreference.

Change-Id: Ia1c46d09c2f0dd053f89ee9d443259cd2dd9803f
2012-07-09 14:02:09 +10:00
Translation updater bot ea843bfd5c Localisation updates from http://translatewiki.net.
Change-Id: I4d37b21bded8dee4088b583ab18c7ba3f107ece3
2012-07-01 14:21:32 +00:00
Translation updater bot fc99ed2ad5 Localisation updates from http://translatewiki.net.
Change-Id: I401b0c2fc9bacc9da03be47c9b39c56f360f6852
2012-06-26 20:49:59 +00:00
Translation updater bot aab63e709b Localisation updates from http://translatewiki.net.
Change-Id: I20642c86123bb2b4b0b70ffaeb9030ecae4d3f0e
2012-06-17 20:34:09 +00:00
Translation updater bot ce38cf1bbf Localisation updates from http://translatewiki.net.
Change-Id: Ie61b2dc17cb5ab485702c3fb75befaf9d63ce561
2012-06-14 20:04:47 +00:00
Dereckson 3d3b81862d (bug 37044) Fixed HTML5 syntax highlight typo
Change-Id: I34d0a19da86ddd8644e0cd3b432154161f7d55ae
2012-06-05 19:01:27 +02:00
Reedy f761411c20 Add .gitignore
Change-Id: I3369e8d13b36314dacfbe9793e30e8b5450ccfee
2012-05-21 01:48:34 +01:00
Translation updater bot 51a3768e79 Localisation updates from http://translatewiki.net.
Change-Id: I43f201e984092020e0555ae430cfb1c0d3511117
2012-05-20 19:51:49 +00:00
Timo Tijhof 794ea4d549 Merge "Remove usage of mw-code-inline" 2012-05-14 22:55:10 +00:00
Translation updater bot f7617c9738 Localisation updates from http://translatewiki.net.
Change-Id: I3eb46cbccdb84e3f84724d83834f26b26c435451
2012-05-12 17:55:25 +00:00
Timo Tijhof b06fbd3b60 Remove usage of mw-code-inline
Remove usage of mw-code-inline:
 * That class ended up not being merged into core, so it does nothing.
   Only mw-code (for the <pre> wrap) is needed.
   7c9b2273c9cbdae90c9f4e3890a13619f769c5d0 (mediawiki/core) had both
   in an earlier patch version, but only mw-code was merged.

Follows-up:
 * mediawiki/extensions/SyntaxHighlight_GeSHi:
   dc147a5ef1
   Use .mw-code and .mw-code-inline

 * mediawiki/core
   7c9b2273c9cbdae90c9f4e3890a13619f769c5d0
   Add .mw-code styles in core

Change-Id: I793c05c3e103209cf966d9e35ab37c05528cdbb8
2012-05-11 04:36:18 +02:00
Translation updater bot 478202f1a4 Localisation updates from http://translatewiki.net.
Change-Id: Ia028680696a468c23d2249d460d459992c4cd2c8
2012-05-01 18:39:38 +00:00