Commit graph

1343 commits

Author SHA1 Message Date
Translation updater bot a946631e15 Localisation updates from https://translatewiki.net.
Change-Id: Ice456dd6992b30aca3452e09ccc60503165e027f
2014-03-27 20:32:21 +00:00
Translation updater bot 69337ceac0 Localisation updates from https://translatewiki.net.
Change-Id: Iefc521355e8e3d748a8e5a806e579995af118e84
2014-02-26 22:03:46 +00:00
Translation updater bot 73a000ea22 Localisation updates from https://translatewiki.net.
Change-Id: I0d2526005c4891b4598bdc14d65219db4fc504f1
2014-02-14 20:21:33 +00:00
Translation updater bot 96540df9d2 Localisation updates from https://translatewiki.net.
Change-Id: I950a9a1e8fc633e020c09b3aaab45e06872b8311
2014-02-01 19:46:36 +00:00
jenkins-bot 6898dfd82e Merge "Remove old username" 2014-01-23 01:32:33 +00:00
Reedy f22a190ce6 Add COPYING
Change-Id: I861c0d58cf2ced32a1cd887186fc2272011af147
2014-01-22 19:44:32 +00:00
helderwiki 69360a1b60 Remove old username
My current user name is already in the list.

Change-Id: Id1e4726857e65f333ebc22e12f3d719ee2859ac2
2014-01-22 15:59:22 -02:00
Translation updater bot 81dc89e9da Localisation updates from https://translatewiki.net.
Change-Id: I246b317a26bbf4490d04b1b5d540fdd24bbd18e5
2014-01-21 19:54:03 +00:00
Translation updater bot c29212de7f Localisation updates from https://translatewiki.net.
Change-Id: Iae3638bef234ceb17f26f4cdb464e830e4890da1
2013-12-28 19:32:35 +00:00
Translation updater bot a4a381877c Localisation updates from https://translatewiki.net.
Change-Id: I37b572a144dfb7deca997b2383d8f5c2b8eff015
2013-12-07 01:52:26 +00:00
Brad Jorsch 335a5e9a9c Protect tabs from HTML Tidy
HTML Tidy doesn't care for tabs, and likes to always output spaces. This
can break the syntax-highlighted output, since Tidy converts tabs to
spaces on the source-code level instead of on the rendered HTML level,
even inside <pre> tags where it really shouldn't (this is probably a bug
in Tidy).

r97300 fixed the bad indenting by converting tabs to spaces before
highlighting, which works around Tidy's bug but breaks highlighting of
languages where tabs are significant (e.g. Whitespace).

It turns out that Tidy's tab mangling occurs while it's reading the
source file, before the conversion of entities such as &#9; to tab. So
GeSHi can armor its <pre>-wrapped output against Tidy's bug by encoding
all tabs as &#9;.

Bug: 30930
Bug: 57826
Change-Id: Id541e2712bd3f94446442ccf2e1e2f214e2801ba
2013-12-02 16:43:36 +00:00
Translation updater bot fd31d07530 Localisation updates from http://translatewiki.net.
Change-Id: Ic3c6b4f62f6bfd0e7d8d78d17ffbc6175653defa
2013-11-02 20:03:21 +00:00
Adamw 2f064f4536 Merge "Haskell syntax: omit single quotes from QUOTEMARKS" 2013-10-24 05:51:03 +00:00
Translation updater bot 7fa4488622 Localisation updates from http://translatewiki.net.
Change-Id: I7841ab7af5e7c2ec280f9f1f9d3894a8d1de4c86
2013-10-21 19:40:33 +00:00
Translation updater bot dff9489b14 Merge "Localisation updates from http://translatewiki.net." 2013-10-15 19:40:43 +00:00
Translation updater bot 4bdf6861a9 Localisation updates from http://translatewiki.net.
Change-Id: I1d973d94b73b0760a0cdd6c12bc7cf574f1035e8
2013-10-15 19:32:38 +00:00
Translation updater bot af8aa7b66b Localisation updates from http://translatewiki.net.
Change-Id: I3147b110244f3854c01abdd49291880f4c3c1e21
2013-10-14 09:31:14 +00:00
Ori Livneh b4b8ff670f Haskell syntax: omit single quotes from QUOTEMARKS
Single quotes in Haskell may be used to delimit character literals, but they
can also be used in identifiers. GeSHi's syntax highlighter only recognizes the
former usage. When Haskell source uses "'" as part of an identifier, GeSHi
treats it as the start of a literal string, which screws up syntax
highlighting.

Upstream bug report and proposed patch have been ignored for more than a year,
so I am applying the proposed fix here, and changing the version identifier to
reflect a WMF modification.

Upstream bug report: <http://sourceforge.net/p/geshi/bugs/217/>
Upstream proposed patch: <http://sourceforge.net/p/geshi/bugs/219/>

Bug: 52509
Change-Id: I210832c4b272b5c03bbc4623d73fb821092e5ef4
2013-10-09 02:48:51 -07:00
Bryan Petty cd001a9ed9 Add Option to Enable Keyword Links
Patch by Bryan Petty

Bug: 53787
Change-Id: I8c818859df8240cfcfef94d06d5d12a848cc76dc
2013-10-09 09:03:03 +00:00
Translation updater bot 32f2019420 Localisation updates from http://translatewiki.net.
Change-Id: I512afaf3fc61d85c8eb3cec7ca4108cffc1c0aa9
2013-10-02 19:54:50 +00:00
Translation updater bot 0c59695854 Localisation updates from http://translatewiki.net.
Change-Id: Icab1dac6c13146d6198cb0345a618cf23e4184d2
2013-08-25 13:30:15 +00:00
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