MediaWiki extensions manual
Release status: experimental
Description Standardizes wikitext after each page save
Author(s) Sophivorustalk
Latest version 2.3
MediaWiki >= 1.39.0
PHP 7.4+
Database changes No
License GNU General Public License 3.0 or later
Example [1]
  • $wgStandardWikitextAccount
  • $wgStandardWikitextNamespaces
Quarterly downloads 3 (Ranked 162nd)
Translate the StandardWikitext extension if it is available at translatewiki.net

The StandardWikitext extension standardizes wikitext after each page save. Use this extension to:

  • Fix messy wikitext
  • Fix some broken wikitext
  • Simplify regular expression search-and-replace
  • Simplify wikitext parsing by other tools
  • Eliminate OCD editing
  • End controversy over wikitext styles

This extension is inspired on JavaScript Standard Style. Enough of this madness!

Installation Edit

  • Download and place the file(s) in a directory called StandardWikitext in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'StandardWikitext' );
  •   Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration Edit

StandardWikitext is designed to work out of the box and needs no configuration. However, the following options are available, each one shown with its default value:

// Namespaces where to run wikitext standardization
$wgStandardWikitextNamespaces = [ NS_MAIN ];

// System account that will do the wikitext standardization
$wgStandardWikitextAccount = "StandardWikitext bot";

Modules Edit

Wikitext is standardized to the following formats.

Sections Edit

== Section ==


=== Sub-section ===


==== Sub-sub-section ====


Links Edit





[[File:Foo.jpg|thumb|left|300px|Caption with [[sublink]].]]

Lists Edit

* Foo
* Bar
* Baz

# Foo
# Bar
# Baz

* Foo
** Bar
*** Baz

Templates Edit



| bar
| baz = qux

Tables Edit

{| class="wikitable"
|+ Caption
! Header
! Header
| Text
| Text
| Text
| Text

References Edit

Text.<ref name="foo" group="bar">Reference</ref>

Text.<ref name="foo" />

Categories Edit



See also Edit