2015-05-20 21:36:13 +00:00
|
|
|
{
|
|
|
|
"name": "SyntaxHighlight",
|
Highlight using Pygments rather than Geshi
GeSHi is unmaintained, lacks support for many popular modern languages, and
suffers from deep architectural flaws, chief among them the inconsistent
tokenization of different languages, each of which requires a custom
stylesheet.
Pygments is a well-maintained alternative. It is, by my count, the most popular
syntax highlighting library around. It is BSD-licensed, actively maintained,
and is widely used in PHP projects.
To keep this easy to review, this change does not include update for l10n
files, and it does not delete the geshi/ directory. I will do those in a
separate patch.
The chief change between this and the previous implementation is that errors
result in the code block not being highlighted, as opposed to not being printed
at all, having been replaced by an angry red error message. I think that is the
right user experience. If you go to StackOverflow or GitHub and try to mark up
your code block as being written in some language that their highlighter
doesn't know about, you don't get an error message -- the code simply doesn't
get highlighted.
Because we don't recursively load dependencies for extensions, to test this,
you will need to create a composer.local.json in $IP and add:
{
"extra": {
"merge-plugin": {
"include": [
"extensions/SyntaxHighlight_GeSHi/composer.json"
]
}
}
}
Then run `composer update`.
Bug: T85794
Change-Id: I07446ec9893fae3d1e394f435d3d95cf8be6bc33
2015-06-16 03:52:58 +00:00
|
|
|
"version": "2.0",
|
2015-05-20 21:36:13 +00:00
|
|
|
"author": [
|
|
|
|
"Brion Vibber",
|
|
|
|
"Tim Starling",
|
|
|
|
"Rob Church",
|
Highlight using Pygments rather than Geshi
GeSHi is unmaintained, lacks support for many popular modern languages, and
suffers from deep architectural flaws, chief among them the inconsistent
tokenization of different languages, each of which requires a custom
stylesheet.
Pygments is a well-maintained alternative. It is, by my count, the most popular
syntax highlighting library around. It is BSD-licensed, actively maintained,
and is widely used in PHP projects.
To keep this easy to review, this change does not include update for l10n
files, and it does not delete the geshi/ directory. I will do those in a
separate patch.
The chief change between this and the previous implementation is that errors
result in the code block not being highlighted, as opposed to not being printed
at all, having been replaced by an angry red error message. I think that is the
right user experience. If you go to StackOverflow or GitHub and try to mark up
your code block as being written in some language that their highlighter
doesn't know about, you don't get an error message -- the code simply doesn't
get highlighted.
Because we don't recursively load dependencies for extensions, to test this,
you will need to create a composer.local.json in $IP and add:
{
"extra": {
"merge-plugin": {
"include": [
"extensions/SyntaxHighlight_GeSHi/composer.json"
]
}
}
}
Then run `composer update`.
Bug: T85794
Change-Id: I07446ec9893fae3d1e394f435d3d95cf8be6bc33
2015-06-16 03:52:58 +00:00
|
|
|
"Niklas Laxström",
|
2015-05-27 16:15:00 +00:00
|
|
|
"Ori Livneh",
|
|
|
|
"Ed Sanders"
|
2015-05-20 21:36:13 +00:00
|
|
|
],
|
2017-05-10 14:18:57 +00:00
|
|
|
"url": "https://www.mediawiki.org/wiki/Extension:SyntaxHighlight",
|
2015-05-20 21:36:13 +00:00
|
|
|
"descriptionmsg": "syntaxhighlight-desc",
|
2018-01-29 05:53:44 +00:00
|
|
|
"license-name": "GPL-2.0-or-later",
|
2015-05-20 21:36:13 +00:00
|
|
|
"type": "parserhook",
|
2017-02-05 20:06:42 +00:00
|
|
|
"requires": {
|
2020-06-10 18:01:21 +00:00
|
|
|
"MediaWiki": ">= 1.34",
|
2019-04-13 15:15:49 +00:00
|
|
|
"platform": {
|
|
|
|
"ability-shell": true
|
|
|
|
}
|
2016-01-09 23:23:40 +00:00
|
|
|
},
|
2015-05-20 21:36:13 +00:00
|
|
|
"MessagesDirs": {
|
|
|
|
"SyntaxHighlight_GeSHi": [
|
|
|
|
"i18n"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"AutoloadClasses": {
|
2018-02-15 22:21:52 +00:00
|
|
|
"SyntaxHighlight": "includes/SyntaxHighlight.php",
|
|
|
|
"SyntaxHighlightAce": "includes/SyntaxHighlightAce.php",
|
|
|
|
"SyntaxHighlightGeSHiCompat": "includes/SyntaxHighlightGeSHiCompat.php",
|
|
|
|
"ResourceLoaderSyntaxHighlightVisualEditorModule": "includes/ResourceLoaderSyntaxHighlightVisualEditorModule.php"
|
Highlight using Pygments rather than Geshi
GeSHi is unmaintained, lacks support for many popular modern languages, and
suffers from deep architectural flaws, chief among them the inconsistent
tokenization of different languages, each of which requires a custom
stylesheet.
Pygments is a well-maintained alternative. It is, by my count, the most popular
syntax highlighting library around. It is BSD-licensed, actively maintained,
and is widely used in PHP projects.
To keep this easy to review, this change does not include update for l10n
files, and it does not delete the geshi/ directory. I will do those in a
separate patch.
The chief change between this and the previous implementation is that errors
result in the code block not being highlighted, as opposed to not being printed
at all, having been replaced by an angry red error message. I think that is the
right user experience. If you go to StackOverflow or GitHub and try to mark up
your code block as being written in some language that their highlighter
doesn't know about, you don't get an error message -- the code simply doesn't
get highlighted.
Because we don't recursively load dependencies for extensions, to test this,
you will need to create a composer.local.json in $IP and add:
{
"extra": {
"merge-plugin": {
"include": [
"extensions/SyntaxHighlight_GeSHi/composer.json"
]
}
}
}
Then run `composer update`.
Bug: T85794
Change-Id: I07446ec9893fae3d1e394f435d3d95cf8be6bc33
2015-06-16 03:52:58 +00:00
|
|
|
},
|
|
|
|
"ResourceFileModulePaths": {
|
|
|
|
"localBasePath": "modules",
|
|
|
|
"remoteExtPath": "SyntaxHighlight_GeSHi/modules"
|
2015-05-20 21:36:13 +00:00
|
|
|
},
|
|
|
|
"ResourceModules": {
|
Highlight using Pygments rather than Geshi
GeSHi is unmaintained, lacks support for many popular modern languages, and
suffers from deep architectural flaws, chief among them the inconsistent
tokenization of different languages, each of which requires a custom
stylesheet.
Pygments is a well-maintained alternative. It is, by my count, the most popular
syntax highlighting library around. It is BSD-licensed, actively maintained,
and is widely used in PHP projects.
To keep this easy to review, this change does not include update for l10n
files, and it does not delete the geshi/ directory. I will do those in a
separate patch.
The chief change between this and the previous implementation is that errors
result in the code block not being highlighted, as opposed to not being printed
at all, having been replaced by an angry red error message. I think that is the
right user experience. If you go to StackOverflow or GitHub and try to mark up
your code block as being written in some language that their highlighter
doesn't know about, you don't get an error message -- the code simply doesn't
get highlighted.
Because we don't recursively load dependencies for extensions, to test this,
you will need to create a composer.local.json in $IP and add:
{
"extra": {
"merge-plugin": {
"include": [
"extensions/SyntaxHighlight_GeSHi/composer.json"
]
}
}
}
Then run `composer update`.
Bug: T85794
Change-Id: I07446ec9893fae3d1e394f435d3d95cf8be6bc33
2015-06-16 03:52:58 +00:00
|
|
|
"ext.pygments": {
|
2015-06-23 11:17:03 +00:00
|
|
|
"targets": [
|
|
|
|
"desktop",
|
|
|
|
"mobile"
|
|
|
|
],
|
Highlight using Pygments rather than Geshi
GeSHi is unmaintained, lacks support for many popular modern languages, and
suffers from deep architectural flaws, chief among them the inconsistent
tokenization of different languages, each of which requires a custom
stylesheet.
Pygments is a well-maintained alternative. It is, by my count, the most popular
syntax highlighting library around. It is BSD-licensed, actively maintained,
and is widely used in PHP projects.
To keep this easy to review, this change does not include update for l10n
files, and it does not delete the geshi/ directory. I will do those in a
separate patch.
The chief change between this and the previous implementation is that errors
result in the code block not being highlighted, as opposed to not being printed
at all, having been replaced by an angry red error message. I think that is the
right user experience. If you go to StackOverflow or GitHub and try to mark up
your code block as being written in some language that their highlighter
doesn't know about, you don't get an error message -- the code simply doesn't
get highlighted.
Because we don't recursively load dependencies for extensions, to test this,
you will need to create a composer.local.json in $IP and add:
{
"extra": {
"merge-plugin": {
"include": [
"extensions/SyntaxHighlight_GeSHi/composer.json"
]
}
}
}
Then run `composer update`.
Bug: T85794
Change-Id: I07446ec9893fae3d1e394f435d3d95cf8be6bc33
2015-06-16 03:52:58 +00:00
|
|
|
"styles": [
|
2015-06-26 00:15:40 +00:00
|
|
|
"pygments.generated.css",
|
2020-12-30 15:31:33 +00:00
|
|
|
"pygments.wrapper.less"
|
Highlight using Pygments rather than Geshi
GeSHi is unmaintained, lacks support for many popular modern languages, and
suffers from deep architectural flaws, chief among them the inconsistent
tokenization of different languages, each of which requires a custom
stylesheet.
Pygments is a well-maintained alternative. It is, by my count, the most popular
syntax highlighting library around. It is BSD-licensed, actively maintained,
and is widely used in PHP projects.
To keep this easy to review, this change does not include update for l10n
files, and it does not delete the geshi/ directory. I will do those in a
separate patch.
The chief change between this and the previous implementation is that errors
result in the code block not being highlighted, as opposed to not being printed
at all, having been replaced by an angry red error message. I think that is the
right user experience. If you go to StackOverflow or GitHub and try to mark up
your code block as being written in some language that their highlighter
doesn't know about, you don't get an error message -- the code simply doesn't
get highlighted.
Because we don't recursively load dependencies for extensions, to test this,
you will need to create a composer.local.json in $IP and add:
{
"extra": {
"merge-plugin": {
"include": [
"extensions/SyntaxHighlight_GeSHi/composer.json"
]
}
}
}
Then run `composer update`.
Bug: T85794
Change-Id: I07446ec9893fae3d1e394f435d3d95cf8be6bc33
2015-06-16 03:52:58 +00:00
|
|
|
]
|
2021-01-01 19:48:57 +00:00
|
|
|
},
|
|
|
|
"ext.pygments.linenumbers": {
|
|
|
|
"targets": [
|
|
|
|
"desktop",
|
|
|
|
"mobile"
|
|
|
|
],
|
|
|
|
"scripts": [
|
|
|
|
"pygments.linenumbers.js"
|
|
|
|
]
|
2021-01-03 00:25:21 +00:00
|
|
|
},
|
|
|
|
"ext.geshi.visualEditor": {
|
|
|
|
"class": "ResourceLoaderSyntaxHighlightVisualEditorModule",
|
|
|
|
"scripts": [
|
|
|
|
"ve-syntaxhighlight/ve.dm.MWSyntaxHighlightNode.js",
|
|
|
|
"ve-syntaxhighlight/ve.dm.MWBlockSyntaxHighlightNode.js",
|
|
|
|
"ve-syntaxhighlight/ve.dm.MWInlineSyntaxHighlightNode.js",
|
|
|
|
"ve-syntaxhighlight/ve.ce.MWSyntaxHighlightNode.js",
|
|
|
|
"ve-syntaxhighlight/ve.ce.MWBlockSyntaxHighlightNode.js",
|
|
|
|
"ve-syntaxhighlight/ve.ce.MWInlineSyntaxHighlightNode.js",
|
|
|
|
"ve-syntaxhighlight/ve.ui.MWSyntaxHighlightWindow.js",
|
|
|
|
"ve-syntaxhighlight/ve.ui.MWSyntaxHighlightDialog.js",
|
|
|
|
"ve-syntaxhighlight/ve.ui.MWSyntaxHighlightDialogTool.js",
|
|
|
|
"ve-syntaxhighlight/ve.ui.MWSyntaxHighlightInspector.js",
|
|
|
|
"ve-syntaxhighlight/ve.ui.MWSyntaxHighlightInspectorTool.js"
|
|
|
|
],
|
|
|
|
"styles": [
|
|
|
|
"ve-syntaxhighlight/ve.ce.MWSyntaxHighlightNode.css",
|
|
|
|
"ve-syntaxhighlight/ve.ui.MWSyntaxHighlightDialog.css",
|
|
|
|
"ve-syntaxhighlight/ve.ui.MWSyntaxHighlightInspector.css"
|
|
|
|
],
|
|
|
|
"dependencies": [
|
|
|
|
"ext.visualEditor.mwcore",
|
|
|
|
"oojs-ui.styles.icons-editing-advanced"
|
|
|
|
],
|
|
|
|
"messages": [
|
|
|
|
"syntaxhighlight-visualeditor-mwsyntaxhighlightinspector-code",
|
|
|
|
"syntaxhighlight-visualeditor-mwsyntaxhighlightinspector-language",
|
|
|
|
"syntaxhighlight-visualeditor-mwsyntaxhighlightinspector-none",
|
|
|
|
"syntaxhighlight-visualeditor-mwsyntaxhighlightinspector-showlines",
|
|
|
|
"syntaxhighlight-visualeditor-mwsyntaxhighlightinspector-startingline",
|
|
|
|
"syntaxhighlight-visualeditor-mwsyntaxhighlightinspector-title"
|
|
|
|
],
|
|
|
|
"targets": [ "desktop", "mobile" ]
|
2015-05-20 21:36:13 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"Hooks": {
|
|
|
|
"ParserFirstCallInit": [
|
2017-05-10 14:18:57 +00:00
|
|
|
"SyntaxHighlight::onParserFirstCallInit"
|
2015-05-20 21:36:13 +00:00
|
|
|
],
|
|
|
|
"ContentGetParserOutput": [
|
2017-05-10 14:18:57 +00:00
|
|
|
"SyntaxHighlight::onContentGetParserOutput"
|
2015-05-20 21:36:13 +00:00
|
|
|
],
|
|
|
|
"ApiFormatHighlight": [
|
2017-05-10 14:18:57 +00:00
|
|
|
"SyntaxHighlight::onApiFormatHighlight"
|
2015-05-20 21:36:13 +00:00
|
|
|
]
|
|
|
|
},
|
2020-05-12 01:05:15 +00:00
|
|
|
"attributes": {
|
2020-05-12 18:27:56 +00:00
|
|
|
"SyntaxHighlight": {
|
2021-01-30 08:19:24 +00:00
|
|
|
"Models": {
|
2020-05-12 18:27:56 +00:00
|
|
|
"css": "css",
|
|
|
|
"javascript": "javascript"
|
|
|
|
}
|
|
|
|
},
|
2020-05-12 01:05:15 +00:00
|
|
|
"VisualEditor": {
|
|
|
|
"PluginModules": [
|
|
|
|
"ext.geshi.visualEditor"
|
|
|
|
]
|
|
|
|
}
|
2015-05-20 21:36:13 +00:00
|
|
|
},
|
|
|
|
"config": {
|
2020-05-12 01:05:15 +00:00
|
|
|
"PygmentizePath": {
|
|
|
|
"value": false
|
|
|
|
}
|
2015-05-29 03:39:54 +00:00
|
|
|
},
|
2015-06-26 21:39:15 +00:00
|
|
|
"TrackingCategories": [
|
2020-01-06 06:22:26 +00:00
|
|
|
"syntaxhighlight-error-category",
|
|
|
|
"syntaxhighlight-enclose-category",
|
|
|
|
"syntaxhighlight-source-category"
|
2015-06-26 21:39:15 +00:00
|
|
|
],
|
2020-05-12 01:05:15 +00:00
|
|
|
"manifest_version": 2
|
2015-05-20 21:36:13 +00:00
|
|
|
}
|