mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-27 16:30:12 +00:00
85ad4513ba
There are multiple formats for these IDs: cite_ref-1, cite_ref-2, and so on for anonymous <ref>s without a name. cite_ref-name_1-0 for named references, where "name" is the custom name, and "_1" is the sequential number for the reference (same number as above). The final "-0" is counting the usages. If a named <ref> is only used once, there is no cite_ref-name_1-1 anywhere on the page. The later was already checked by the code. But we forgot about unnamed references! As a consequence IDs like the cite_ref-1 above got misdetected as reused references. This patch tries hard to extract code into named functions, so it becomes much more clear what they do, and why. Bug: T215317 Change-Id: Iedb5b0c3dffae19bad7df9a43ed2d4512b3921ec
136 lines
3 KiB
JSON
136 lines
3 KiB
JSON
{
|
|
"name": "Cite",
|
|
"version": "1.0.0",
|
|
"author": [
|
|
"Ævar Arnfjörð Bjarmason",
|
|
"Andrew Garrett",
|
|
"Brion Vibber",
|
|
"Ed Sanders",
|
|
"Marius Hoch",
|
|
"Steve Sanbeg",
|
|
"Trevor Parscal",
|
|
"..."
|
|
],
|
|
"url": "https://www.mediawiki.org/wiki/Extension:Cite",
|
|
"descriptionmsg": "cite-desc",
|
|
"license-name": "GPL-2.0-or-later",
|
|
"type": "parserhook",
|
|
"requires": {
|
|
"MediaWiki": ">= 1.32.0"
|
|
},
|
|
"MessagesDirs": {
|
|
"Cite": [
|
|
"i18n",
|
|
"modules/ve-cite/i18n"
|
|
]
|
|
},
|
|
"APIPropModules": {
|
|
"references": {
|
|
"class": "ApiQueryReferences"
|
|
}
|
|
},
|
|
"Hooks": {
|
|
"ParserFirstCallInit": [
|
|
"Cite::setHooks"
|
|
],
|
|
"ContentHandlerDefaultModelFor": [
|
|
"CiteHooks::onContentHandlerDefaultModelFor"
|
|
],
|
|
"ResourceLoaderTestModules": [
|
|
"CiteHooks::onResourceLoaderTestModules"
|
|
],
|
|
"ResourceLoaderRegisterModules": [
|
|
"CiteHooks::onResourceLoaderRegisterModules"
|
|
],
|
|
"LinksUpdate": [
|
|
"CiteHooks::onLinksUpdate"
|
|
],
|
|
"LinksUpdateComplete": [
|
|
"CiteHooks::onLinksUpdateComplete"
|
|
],
|
|
"ResourceLoaderGetConfigVars": [
|
|
"CiteHooks::onResourceLoaderGetConfigVars"
|
|
],
|
|
"APIQuerySiteInfoGeneralInfo": "CiteHooks::onAPIQuerySiteInfoGeneralInfo"
|
|
},
|
|
"ResourceModules": {
|
|
"ext.cite.styles": {
|
|
"styles": {
|
|
"ext.cite.styles.css": {},
|
|
"ext.cite.print.css": {
|
|
"media": "print"
|
|
}
|
|
},
|
|
"skinStyles": {
|
|
"minerva": "ext.cite.styles.minerva.less"
|
|
},
|
|
"targets": [
|
|
"desktop",
|
|
"mobile"
|
|
]
|
|
},
|
|
"ext.cite.a11y": {
|
|
"scripts": "ext.cite.a11y.js",
|
|
"styles": "ext.cite.a11y.css",
|
|
"messages": [
|
|
"cite_references_link_accessibility_label",
|
|
"cite_references_link_many_accessibility_label"
|
|
]
|
|
},
|
|
"ext.cite.ux-enhancements": {
|
|
"scripts": [
|
|
"ext.cite.a11y.js",
|
|
"ext.cite.highlighting.js"
|
|
],
|
|
"styles": [
|
|
"ext.cite.a11y.css",
|
|
"ext.cite.highlighting.css"
|
|
],
|
|
"messages": [
|
|
"cite_reference_link_prefix",
|
|
"cite_references_link_accessibility_label",
|
|
"cite_references_link_many_accessibility_label",
|
|
"cite_references_link_accessibility_back_label"
|
|
]
|
|
},
|
|
"ext.cite.style": {
|
|
"class": "CiteCSSFileModule",
|
|
"styles": "ext.cite.style.css",
|
|
"targets": [
|
|
"desktop",
|
|
"mobile"
|
|
]
|
|
}
|
|
},
|
|
"ResourceFileModulePaths": {
|
|
"localBasePath": "modules",
|
|
"remoteExtPath": "Cite/modules"
|
|
},
|
|
"VisualEditorPluginModules": [
|
|
"ext.cite.visualEditor"
|
|
],
|
|
"ConfigRegistry": {
|
|
"cite": "GlobalVarConfig::newInstance"
|
|
},
|
|
"config": {
|
|
"CiteStoreReferencesData": false,
|
|
"CiteCacheReferencesDataOnParse": false,
|
|
"CiteVisualEditorOtherGroup": false,
|
|
"CiteResponsiveReferences": true
|
|
},
|
|
"AutoloadClasses": {
|
|
"ApiQueryReferences": "includes/ApiQueryReferences.php",
|
|
"Cite": "includes/Cite.php",
|
|
"CiteHooks": "includes/CiteHooks.php",
|
|
"CiteDataModule": "includes/CiteDataModule.php",
|
|
"CiteCSSFileModule": "includes/CiteCSSFileModule.php"
|
|
},
|
|
"TrackingCategories": [
|
|
"cite-tracking-category-cite-error"
|
|
],
|
|
"CodeMirrorTagModes": {
|
|
"ref": "text/mediawiki"
|
|
},
|
|
"manifest_version": 1
|
|
}
|