mediawiki-extensions-Syntax.../extension.json
Ori Livneh 927f40e98a Hide the red border around syntax errors
MZMcBride noticed the red border around '國' in
https://en.wikipedia.org/wiki/Swift_(programming_language)#Example_code

That particular case happens to be a Pygments bug, because multibyte characters
are valid variable names in Swift. But even in cases of legitimate syntax
errors, I don't think we want to show the red border. This behavior may be
useful in code editors, but it is not useful in a wiki environment, especially
given the longstanding habit of using an existing, mostly-compatible lexer to
highlight a language for which no specific lexer exists.

To fix this, override the style in pygments.wrapper.css, and swap the order in
which the two CSS files are concatenated, so that in general we have the
ability to override Pygments-generated CSS.

Change-Id: I304fdaf3a462445d316e0f7fecc983fa87afc629
2015-06-25 17:24:15 -07:00

96 lines
2.3 KiB
JSON

{
"name": "SyntaxHighlight",
"version": "2.0",
"author": [
"Brion Vibber",
"Tim Starling",
"Rob Church",
"Niklas Laxström",
"Ori Livneh",
"Ed Sanders"
],
"url": "https://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi",
"descriptionmsg": "syntaxhighlight-desc",
"license-name": "GPL-2.0+",
"type": "parserhook",
"MessagesDirs": {
"SyntaxHighlight_GeSHi": [
"i18n"
]
},
"AutoloadClasses": {
"SyntaxHighlight_GeSHi": "SyntaxHighlight_GeSHi.class.php",
"GeSHi": "SyntaxHighlight_GeSHi.compat.php",
"ResourceLoaderGeSHiVisualEditorModule": "ResourceLoaderGeSHiVisualEditorModule.php"
},
"ExtensionFunctions": [
"SyntaxHighlight_GeSHi::onSetup"
],
"ResourceFileModulePaths": {
"localBasePath": "modules",
"remoteExtPath": "SyntaxHighlight_GeSHi/modules"
},
"ResourceModules": {
"ext.pygments": {
"position": "top",
"targets": [
"desktop",
"mobile"
],
"styles": [
"pygments.generated.css",
"pygments.wrapper.css"
]
},
"ext.geshi.visualEditor": {
"class": "ResourceLoaderGeSHiVisualEditorModule",
"scripts": [
"VisualEditor/ve.dm.MWSyntaxHighlightNode.js",
"VisualEditor/ve.ce.MWSyntaxHighlightNode.js",
"VisualEditor/ve.ui.MWSyntaxHighlightInspector.js",
"VisualEditor/ve.ui.MWSyntaxHighlightInspectorTool.js"
],
"styles": [
"VisualEditor/ve.ui.MWSyntaxHighlightInspector.css"
],
"dependencies": [
"ext.visualEditor.mwcore"
],
"messages": [
"syntaxhighlight-visualeditor-mwsyntaxhighlightinspector-code",
"syntaxhighlight-visualeditor-mwsyntaxhighlightinspector-language",
"syntaxhighlight-visualeditor-mwsyntaxhighlightinspector-title"
],
"targets": [ "desktop", "mobile" ]
}
},
"Hooks": {
"ParserFirstCallInit": [
"SyntaxHighlight_GeSHi::onParserFirstCallInit"
],
"ContentGetParserOutput": [
"SyntaxHighlight_GeSHi::onContentGetParserOutput"
],
"ApiFormatHighlight": [
"SyntaxHighlight_GeSHi::onApiFormatHighlight"
],
"RejectParserCacheValue": [
"SyntaxHighlight_GeSHi::onRejectParserCacheValue"
]
},
"SyntaxHighlightModels": {
"css": "css",
"javascript": "javascript"
},
"VisualEditorPluginModules": [
"ext.geshi.visualEditor"
],
"config": {
"PygmentizePath": false
},
"ParserTestFiles": [
"tests/parserTests.txt"
],
"manifest_version": 1
}