Commit graph

1350 commits

Author SHA1 Message Date
Derk-Jan Hartman 72d1e92263 Add extension.json, empty PHP entry point
Bug: T88063
Change-Id: I42afa0bf81f4f89b81a11bcafcb8e4c032a2d173
2015-05-19 17:05:43 -07:00
Kunal Mehta a18bb2e699 Remove i18n shim
Change-Id: If73418a8ff66ae0155c1b798d817a26d0e14bb1e
2015-05-19 17:05:19 -07:00
Translation updater bot dcf27813a4 Localisation updates from https://translatewiki.net.
Change-Id: Iea83790f77e580a5f9481872e29e2a73b0db5b3b
2015-05-18 22:22:39 +02:00
Niklas Laxström 14fdd87897 Fix I062a2246
Change-Id: I38ef15c7cc162acb6101e327787631a586abfcde
2015-05-02 13:13:43 +02:00
Timo Tijhof 19a6005668 ResourceLoaderSchemaModule: Call parent getDefinitionSummary() method
This should've been the case already and will result in an exception
otherwise in MediaWiki core as of Ibb292d2416839.

Change-Id: I062a224662823224f3104d9e8d05abce47b1da81
2015-05-02 00:50:13 +01:00
Ori Livneh 4c92cbc430 Re-apply fix for Haskell syntax
See I210832c4.

Change-Id: I5e74332b22fe58a39f99c70adb429f795f18ae75
2015-04-17 10:46:29 -07:00
jenkins-bot 8ea05787d4 Merge "Add missing and new languages" 2015-04-10 12:17:24 +00:00
Timo Tijhof 7a46e84d69 ResourceLoaderGeSHiModule: Cache file mtime of __FILE__
There are 100s of instances of this module. This can slow things
down quite a bit in Vagrant when it recomputes the same timestamp
many times.

Change-Id: Iaebafe1acf7a0e30ebf86179961ad52f56bb689f
2015-04-03 07:09:02 +01:00
Timo Tijhof 4ebdd607f5 ResourceLoaderGeSHiModule: Use GESHI_VERSION instead of file mtime
Follows-up b6d8b1a5b.

Should be more accurate since this bumps whenever we update our
version of Geshi. For other changes in SyntaxHighlight_GeSHi.class
cache should not be pro-actively invalidated.

Change-Id: I1c2040ca9b8719adcbbacd195c5050acb6d93295
2015-03-31 19:37:03 +01:00
Derk-Jan Hartman dbf443c025 Add missing and new languages
Out geshi language list had not been updated after the last update and
we were missing a few language names containing - and _ like php-brief

Bug: T94292
Change-Id: I83bf1aeb95e1ed7c2cd2eba865987a772e3f08eb
2015-03-28 13:33:29 +01:00
Translation updater bot ffc64ed2b0 Localisation updates from https://translatewiki.net.
Change-Id: Icdde6fbd22c9b6e59f7a38ecf040049e15fe491a
2015-03-24 22:34:50 +01:00
Brad Jorsch 3fe85b9313 Add api-pretty-content class when pretty-printing API output
The API has wrapped its pretty-printed output since Id9cdf102. Apply an
appropriate class to preserve this now that GeSHi is handling it.

Unfortunately GeSHi itself doesn't support adding more than one arbitrary class
to the <pre> (and we're already using that), so we have to add it in a
post-processing step.

Bug: T88742
Change-Id: I38e41db5c341fe06ff825c82d5a9cd4810b7cc24
2015-02-27 19:12:36 -05:00
Chad Horohoe c8297429a6 Remove obvious function-level profiling
Change-Id: Idd5f9178987000df892dde70c11686ddd9306f10
2015-02-10 13:29:40 -08:00
Ricordisamoa b6c32b552e Add 'license-name' matching SPDX conventions
References:
http://spdx.org/licenses/
https://www.mediawiki.org/wiki/Manual:$wgExtensionCredits#license-name

Change-Id: Ibdd165eb5799c7eddf128c939e0cfdbd2cee8e1f
2015-01-29 15:05:09 +01:00
Derk-Jan Hartman 49044ad215 Allow "0" as the content of <syntaxhighlight>
The empty() function considers "0" to be empty. Makes empty() useless
for strings.

(cherry picked from commit 8d8fb22ebb)

Bug: T41643
Change-Id: If0e647e3be269edcb23748d246bc564483aff0d2
2015-01-05 12:49:59 +00:00
paladox 966ed89270 Set Geshi version in main php file
The version was set from the ExtensionTypes hook (which runs only on
Special:Version). WikiApiary and other API consumers were unable to
detect the version.

This is an amended resubmission of the reverted d69ae1f3ac, in which
the constant was declared twice.

Change include_once to require_once for langs file (follows-up 168e1296).

Bug: T75666
Change-Id: I836e0df942a066d80255c1b68472e7ee58124357
2015-01-05 12:39:45 +00:00
Translation updater bot f7a3487f56 Localisation updates from https://translatewiki.net.
Change-Id: Iebcc9f89dc190df67e32dc1d425fb892353ae561
2014-12-02 22:07:26 +01:00
Brad Jorsch 0566e200cf 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 was reported upstream last time it occurred at
https://sourceforge.net/p/geshi/bugs/223/

Bug: T76352
Change-Id: I9e1f002838ffa546c12baf88517069c78a5e7b9d
(cherry picked from commit f21f048443)
2014-12-01 11:15:06 -05:00
Niklas Laxström 5cfbe978e1 Fix PHP Notice in Special:Version
Follow-up to broken revert Ic724f6fe1b1c

Change-Id: I61d19394997cc3499fa084d1b3dc8a7706a499d1
2014-11-27 16:27:53 +00:00
Translation updater bot d74d667425 Localisation updates from https://translatewiki.net.
Change-Id: If1b6f1ddb7d9e4e016eb98ea6d71dee460090e70
2014-11-26 22:36:30 +01:00
Ori Livneh 1369e4b813 Initialise in getSupportedLanguages()
Change-Id: Ic155c54ef9fe0dac3a3c09e563828ccb0dcaf481
2014-11-19 12:05:20 -08:00
Reedy a03277741a Revert "Fix tracking for version"
This reverts commit d69ae1f3ac.

Change-Id: Ic724f6fe1b1cbc969ac195762bdf517e129cd9dd
2014-11-19 16:29:52 +00:00
Ori Livneh 168e1296db Avoid file glob in SyntaxHighlight_GeSHi::getSupportedLanguages()
Store the list of supported languages in SyntaxHighlight_GeSHi.langs.php, which
is auto-generated via a maintenance script, updateLanguageList.php.

Change-Id: Ie0be7c42fa6716555c3e03e3f28734d7e0302664
2014-11-18 16:50:59 -08:00
jenkins-bot 97a9c6e6d7 Merge "Fix Lua comment blocks and string blocks." 2014-11-18 16:27:16 +00:00
paladox d69ae1f3ac Fix tracking for version
* wikiapiary does not detect the version so this way fixes the issue.

Note this has been tested.

Change-Id: I2ad43801cc71285cad8576657c5dc5e4668a37b3
2014-11-14 21:36:42 +00:00
Derk-Jan Hartman 633b18a1fc Fix Lua comment blocks and string blocks.
- Match comments non-greedily instead of greedily
- Re-add support for block strings (similar to heredoc)

Bug: 73281
Change-Id: Ib7f6eeb2df17434740fb85cee955d76762b56fe5
2014-11-13 22:39:24 +01:00
jenkins-bot 88fc1cbb8c Merge "Update GeSHi to 1.0.8.12 release" 2014-11-11 13:40:07 +00:00
Kunal Mehta f798181948 Don't overwrite existing value of $wgSyntaxHighlightModels
Currently extensions that want to add their model to $wgSyntaxHighlightModels
must do so in an extension function since they don't want to assume
that their extension is loaded after SyntaxHighlight GeSHi is.
But by not overwriting the array during initialization, extensions
don't have to worry about load order.

Also require a minimum of MW 1.24 which removed support for
register_globals.

Change-Id: I15c56690d156e90991aa86a3d79dbeaeb18dd6fd
2014-11-10 15:07:04 -08:00
Reedy eed20b9af3 Update GeSHi to 1.0.8.12 release
d9cfd3e0cc

Already updated to 1 commit behind 1.0.8.12 release,
so this just tidies it up and brings it into line.

Change-Id: I2e8c4bc39844baf397547d824d7419fa25506f37
2014-11-06 21:08:30 +00:00
jenkins-bot 46e2435b9d Merge "Update GeSHi from upstream" 2014-11-02 14:03:13 +00:00
Translation updater bot eac73fbee5 Localisation updates from https://translatewiki.net.
Change-Id: I68868c5c74f833d2f3b7d5419e1cb572f06fa19e
2014-10-29 22:07:46 +01:00
Reedy c918679022 Update GeSHi from upstream
Import e89ac0019e

e89ac0019e

Bug: 52509
Change-Id: Ibff6c89e919230a952b0c9cd840ce6ce3e2bb02a
2014-10-29 17:56:35 +00:00
Translation updater bot 83c54385ef Localisation updates from https://translatewiki.net.
Change-Id: I93f28765a1bfa972b0d8e7c7f83a2e2c8fcd6740
2014-10-27 20:19:04 +01:00
Kunal Mehta 53e1b42012 Check $wgUseSiteCss inside ResourceLoaderGeSHiLocalModule
This way the module is always loaded, but will be empty or not
depending on the config setting.

Change-Id: Id4f18c58f62c530fbf7d81ff0880281684296b7d
2014-10-13 16:35:49 -07:00
jenkins-bot 8b566a3d95 Merge "Implement 'ApiFormatHighlight' hook" 2014-10-13 23:24:13 +00:00
Brad Jorsch 8dde10991c Implement 'ApiFormatHighlight' hook
Core change I04b1a3842 adds a hook to allow extensions to
syntax-highlight the pretty-printed output from the API.

Change-Id: If0413a1d922ff8a47afc355e0a2cc276cf54b400
2014-10-13 16:22:59 -07:00
Translation updater bot 0282d4a65f Localisation updates from https://translatewiki.net.
Change-Id: I2258531e714742812b3b87fe9bf434b9ccacd253
2014-09-24 22:19:31 +02:00
Kunal Mehta da41c89fb7 Fix incorrect casing of "ContentHandler" class name
Change-Id: I502c4d2f401f655153976ddce5c3d08e469b050f
2014-09-14 21:50:20 -07:00
Translation updater bot 20444ef26c Localisation updates from https://translatewiki.net.
Change-Id: Ie5e969d13489ab352b86c64a30da52d0203d6db9
2014-09-02 22:17:59 +02:00
jenkins-bot cd8fa98aea Merge "Parse page content using the standard parser first for link tables" 2014-07-30 22:52:50 +00:00
Reedy 6941a4fb69 Remove out of date information from README
Change-Id: I27b6afcdc1fdab7677d51106fd1e3b2096d9b616
2014-07-30 20:25:55 +01:00
Bartosz Dziewoński 9d69259b13 Parse page content using the standard parser first for link tables
We could do this using TextContent::fillParserOutput(), but alas it is
'protected', so we have to duplicate a tiny bit of code from there.

Bug: 68757
Change-Id: I7d98fa0f97fb195d23caa3d7448a15c3bbe430ca
2014-07-30 21:09:05 +02:00
Bartosz Dziewoński d7b87ac836 Use ContentGetParserOutput hook instead of ShowRawCssJs
Depends on I58679856 in core MediaWiki.

This breaks compatibility with MW < 1.24.

Bug: 64859
Change-Id: Idf4ad4397101a4d19be2ac773cd4bad52188d903
2014-06-20 19:57:59 +00:00
Kunal Mehta 0138535793 Rename one more occurrence of HighlightGeSHilocal
Change-Id: Ie173b17db586491455b3182d227f73ba21859323
Follows-Up: I018c1a4ea290ec914f7605d402c297d0c6fe113f
2014-06-16 00:47:13 -07:00
Reedy 5cdceae3c3 Update comments
Add a couple of GPL headers

Change-Id: I55acc3bf4e45ae62e41ffe16f081073111171779
2014-06-15 17:22:00 -07:00
Reedy 13dfba4f9a Rename hook subscriber
Swap global function for closure

Change-Id: I41a17461546ac76e223db1c2dc5b2be1ff093af8
2014-06-16 00:20:08 +00:00
Reedy 33ab38abe5 Rename HighlightGeSHilocal to ResourceLoaderGeSHiLocalModule
Change-Id: I018c1a4ea290ec914f7605d402c297d0c6fe113f
2014-06-01 18:57:10 +01:00
Translation updater bot 7ae613d999 Localisation updates from https://translatewiki.net.
Change-Id: I7f567d0f8b9f987e2dcfc938231f10bde43541d9
2014-05-24 15:23:40 +00:00
Bartosz Dziewoński 44177a6b13 Make sure font size in GeSHi output is not too small
Follow-up to I7bbdcc0a, see it for details.

Also cleared up the comment describing this here.

Bug: 26204
Change-Id: I103a6d5c3e1f91cf74e244756c2ad318e429a78e
2014-05-06 01:50:04 +02:00
Bartosz Dziewoński 79b37aa109 Remove unused backwards-compatibility code
Change-Id: Iffa42d7579d882cd119851a075b6e63f670c02bc
2014-05-05 12:32:56 +02:00