Commit graph

58 commits

Author SHA1 Message Date
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
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
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
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
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
Bartosz Dziewoński b6d8b1a5b9 Use ResourceLoader modules for style loading
We want to be able to track what styles were added to be able to deliver
this information to MediaWiki's live preview functionality (in order
to solve bug 24134).

This required moving some code in SyntaxHighlight_GeSHi class around.

The old way still works and is used for MediaWiki 1.20 and lower.

Bug: 24134
Change-Id: Iafd91de8922be55688fedef4e43a8e7f54d4e1cc
2014-05-04 20:46:21 +02:00
Siebrand Mazeland 5835d5f052 Migrate to JSON i18n
Procedure per https://www.mediawiki.org/wiki/Manual:GenerateJsonI18n.php
with shim.

Change-Id: I28967ff1b8fc990bb5bcc88cd49a73c681dcfc91
2014-03-28 22:39:14 +01: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
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
Brion Vibber 59878fdb6a Update a butt-ton of extension about URLs to point to https://www.mediawiki.org/ 2011-12-13 23:49:33 +00:00
Roan Kattouw 4227b5510d (bug 27714) Load MediaWiki:Geshi.css using ResourceLoader. Modified patch by Lewis Cawte 2011-11-20 18:07:20 +00:00
Sam Reed 14ed0b1bf4 * (bug 29144) Move action=dublincore and action=creativecommons to extensions
Moved CreativeCommonsRDF out to extension
2011-05-26 00:08:16 +00:00
Sam Reed 29de7361fb Fixup (and add) some braces, remove trailing whitespace 2010-08-09 06:56:38 +00:00
Jeroen De Dauw 4bc3dbd009 Follow up to r70741 2010-08-09 06:25:28 +00:00
Sam Reed c5c7fb503b Correct the address of the FSF in extension GPL headers
59 Temple Place -> 51 Franklin Street
2010-06-21 13:45:17 +00:00
Alexandre Emsenhuber 48ff53a3c0 Big changes to extensions' documentation:
* changed all @addtogroup to @ingroup
* added some @file where needed
* changed some @package/@subpackage to @ingroup
2010-06-06 15:12:22 +00:00
Siebrand Mazeland 72836900dd * Remove $wgExtensionCredits['description'] where $wgExtensionCredits['descriptionmsg'] present. This feature was introduced in MediaWiki 1.12, and 'description' is not used if 'descriptionmsg' is present.
* Random indentation updates and trailing whitespace removed
2010-02-22 23:41:51 +00:00
Max Semenik 655655cf75 Per Chad's suggestion on r60489 CR, updated compatibilty notice and moved in from source file to README. 2009-12-30 12:02:04 +00:00
Chad Horohoe 169e22e856 Nuking fallback code for MW < 1.12 in most extensions (there's like 5 or 6 left I haven't done). Couple of points:
* 1.11 and below aren't supported anymore, so we don't need to be maintaining back-compat code for it anymore. This is why we branch extensions
* The vast majority of these were using $wgParser. This defeats the purpose of ParserFirstCallInit...allowing you to use parsers other than $wgParser. All these extensions now work in any instance of the Parser, not just $wgParser
2009-09-04 22:22:12 +00:00
Tim Starling 0355a57d41 Patches for bugs 20490 and 20491 by Juliano F. Ravasi (improper use of the ParserFirstCallInit hook). If we want to drop support for 1.11, that can be done in a subsequent commit. 2009-09-04 01:05:04 +00:00
Chad Horohoe 60e453d99a Update last checked version. Also, the ExtensionDistributor bundles the geshi directory, so make a note in README so people don't download it a 2nd time :) 2009-08-05 22:33:30 +00:00
Shinjiman e63f55da7d show the version information of GeSHi currently using, only show the version when Special:Version is loaded using the SpecialVersionExtensionTypes hook.
Link to r52546, r52550 and r52555 as there have some comments on CodeReview.
2009-07-01 19:34:01 +00:00
Shinjiman bb149b0887 revert r52546 and r52550 for slow loading for the class, per CodeReview. 2009-06-29 17:06:59 +00:00
Shinjiman b7179c44cf tweak for r52546, use require_once() to make the class file only load once. 2009-06-29 16:29:43 +00:00
Shinjiman 261fb2e5d4 show the version information of GeSHi currently using, only show the version when the required geshi.php was found. 2009-06-29 15:07:40 +00:00
Niklas Laxström ba99b4641f * bug (18820) Cannot parse source code containing <source>
-> Added alternative tag <syntaxhighlight>
2009-05-17 15:49:17 +00:00
X! 72521f6b30 Add optional $wgSyntaxHighlightDefaultLang parameter; allows people to set a default language that shows up if the lang parameter is missing. 2009-05-17 15:21:37 +00:00
Shinjiman 7a29a3d88e Follows up r49890, adding file location itself to obtaining the revision number shown in the Special:Version 2009-04-27 03:15:19 +00:00
Chad Horohoe dcff6847ef Big commit. Removing svn-version and svn-date from extensions. Per the list, these versions do not give valuable information and are often wildly inaccurate. 2009-03-26 17:39:49 +00:00
Niklas Laxström 3fdce00db1 * (bug 15634) Add The Enclosure/Header Type "none" 2008-09-28 15:30:45 +00:00
Niklas Laxström 9bb924174a * Add highlight support: highlight=3,6-7 2008-07-10 12:45:20 +00:00
Niklas Laxström 76a0e4416e * Avoid unstubbing parser too early 2008-05-25 21:09:41 +00:00
Tim Starling 769130f449 Don't call preg_replace ~80 times per request. Leave the heavy lifting to Special:Version, using the new svn-revision member of $wgExtensionCredits. 2008-05-06 11:59:58 +00:00
Siebrand Mazeland cefc34361b * add svn:keywords 'LastChangedDate'
* replace text 'version' in ExtensionCredits with version based on 'LastChangedDate' for automatic version updating
2008-02-27 14:13:10 +00:00
Raimond Spekking 64015190b5 Add 'descriptionmsg' for Special:Version 2008-02-06 23:37:30 +00:00
Siebrand Mazeland d31a5dc268 * use wfLoadExtensionMessages for SyntaxHighlight_GeSHi
* add version in extension credits
* update Translate extension
2008-01-11 09:05:18 +00:00
Siebrand Mazeland cdb0223ee8 revert r28371 to r28375 2007-12-16 18:27:23 +00:00
Siebrand Mazeland 5941085371 * complete $wgExtensionCredits
* remove trailing whitespace
2007-12-10 21:33:25 +00:00
Rob Church 86a708ab29 Honour 'LoadAllMessages' hook; make sure messages show up in Special:Allmessages, etc. 2007-07-21 01:26:43 +00:00
Aryeh Gregor 31d38a098d Revert r23618 per Brion. Now, to get phase3 and extensions in the same repo locally so I can commit to both at once . . . 2007-07-02 23:24:19 +00:00
Aryeh Gregor 64f6986768 Remove function that hooks into ShowRawCssJs, which no longer exists (<source> tags can be added manually, and anyway people were complaining that it caused Firefox to hang on very long JS pages) 2007-07-01 19:58:44 +00:00
Rob Church 27ffb0306c Update for r23553, r23554 2007-06-29 13:57:08 +00:00
Rob Church 168e3760e9 * Massive refactor; move a lot of code out of the global function namespace and clean several bits up, including broken use of $wgUser inside parser hook
* Take advantage of the new "ShowRawCssJs" hook and format CSS and JavaScript when viewing those pages
2007-06-29 04:33:14 +00:00
Aryeh Gregor 449f00d6ee Extensions too! 2007-06-29 01:36:09 +00:00
Rob Church 1489ee5a8d Spelling mistake, a hundred lines for the offending developer:
"I must learn to spell 'highlighter'"
2007-06-05 18:30:24 +00:00