Go to file
thiemowmde c921c76dd2 Consolidate duplicate "is reference list empty" code paths
Introduce a static method so we don't need to copy paste code.

Note that the static method still largely duplicates what the method
.buildIndex() will later do. Both loops iterate the reference groups
and the references in each group. The main difference is that the
"is empty" check stops extremely early the moment it finds any
non-empty group.

That's also why I'm convinced it's not worth caching the result.
I benchmarked it and it's nanoseconds. But there are more reasons:

The non-static .isIndexEmpty() method is currently only used when
Citoid is active the same time. Which means the cached result was
entirely unused on installations without Citoid.

Bug: T356871
Change-Id: Id5c4295086bc977ef52ad141be9962d2eecb1bcc
2024-05-07 15:51:12 +02:00
.phan Add ReferencePreviews config checks to Cite extension 2024-04-25 12:50:27 +02:00
i18n Localisation updates from https://translatewiki.net. 2024-05-07 09:22:19 +02:00
modules Consolidate duplicate "is reference list empty" code paths 2024-05-07 15:51:12 +02:00
src Don't load ReferencePreviews when not enabled in the config 2024-04-30 11:10:22 +02:00
tests Consolidate duplicate "is reference list empty" code paths 2024-05-07 15:51:12 +02:00
.eslintrc.json Move reference previews to Cite extension 2024-03-12 17:43:51 +01:00
.gitignore Move Cypress tests under tests/ directory 2024-04-04 13:06:26 +00:00
.gitreview Whoops, track not trace 2016-10-24 17:02:15 -07:00
.mailmap .mailmap: Add bot contributors so they're easily ignored 2024-03-22 16:03:23 +00:00
.npmrc Move Cypress tests under tests/ directory 2024-04-04 13:06:26 +00:00
.phpcs.xml More simple and consistent @covers and @license tags 2023-12-15 12:12:16 +01:00
.stylelintrc.json build: Update stylelint config 2023-05-30 20:18:01 +00:00
AUTHORS.txt Add main authors of the current non-Parsoid implementation 2024-04-03 12:41:25 +02:00
CODE_OF_CONDUCT.md build: Updating mediawiki/mediawiki-codesniffer to 22.0.0 2018-09-02 23:29:58 +00:00
composer.json build: Updating dependencies 2024-04-26 11:10:51 -07:00
COPYING.txt Add license details and give credit to more authors (based on git shortlog) 2014-07-26 16:16:47 -07:00
extension.json Add ReferencePreviews config checks to Cite extension 2024-04-25 12:50:27 +02:00
Gruntfile.js Move Cypress tests under tests/ directory 2024-04-04 13:06:26 +00:00
jsdoc.json Move reference previews to Cite extension 2024-03-12 17:43:51 +01:00
MIT-LICENSE.txt doc: Bump copyright year 2018-01-02 17:05:50 -08:00
package-lock.json [build] Update Cypress to v13.8.1 2024-04-30 12:54:37 +02:00
package.json [build] Update Cypress to v13.8.1 2024-04-30 12:54:37 +02:00
README.md Clean up top-level docs 2024-03-12 12:23:18 +01:00

The Cite extension to MediaWiki provides a way for wiki editors to add references and footnotes to articles.

See mw:Extension:Cite for technical documentation on installing and configuring the extension. See mw:Help:Cite for user documentation.

Cite is responsible for implementing the <ref> and <references> tags in wikitext. Integrations are provided for the legacy wikitext parser, Parsoid, WikiEditor, VisualEditor, and the reading interface.