A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.mediawiki.org/wiki/Special:MyLanguage/Wikitext_parser/Core_tag_hooks below:

Parser 2011/Core tag hooks - MediaWiki

Tag hooks resemble HTML/XML elements in appearance:

There are some differences between HTML-alikes and tag hooks:

HTML-alikes a little different in handling of nesting etc?

Tag hooks may also be invoked using parser function syntax, via {{#tag}}. HTML-alikes may not.

These tags are pretty much passed through to their HTML equivalents, with contained text allowed to be expanded further as wiki markup. There are some limitations!

Attribute filtering[edit]

Only whitelisted attributes may be passed through; some attributes will also have validation applied.

Context settings:

todo: provide canonical whitelists

The <nowiki> tag hook is always available by default; it suppresses parsing of wikitext within the contents, leaving it as plain text.

Expected rendering:

Attributes:

The <pre> tag hook is always available by default. It works slightly differently from just an HTML <pre> tag, as it also suppresses parsing of wikitext within the contents.

Expected rendering:

Attributes:

(todo)

Optional: in classic parser only used when $wgRawHtml is enabled. Should not be used in general as it is unsafe!

Expected rendering:

Note that this may actually... explode horribly, depending on how it's used. Might need to be dropped entirely for some usages (wikimedia fundraising sites need love here)

Attributes:

As implemented in Extension:Math in MediaWiki 1.19 and later (built in to core in 1.18 and earlier).

Expected rendering:

Attributes:

todo: details of validation / whitelist of allowed sequences / common latex setup code

Extension:Cite provides tag hooks for rendering basic footnotes / endnotes / citations, and is widely used within Wikipedia and related sites.

In Extension:ParserPlayground's JS code, this is implemented in the MWRefTagHook and MWReferencesTagHook classes. These sample implementations attempt to expand into further parse nodes, so shouldn't require special renderer support (in theory).

Represents and anchored link to a reference note, optionally defining the text of the note.

Expected rendering:

Collects previously-defined ref entries and renders them in a list.

Expected rendering:

Does this include the cite definitions too?

What about if empty?

Warning shown when there are defined refs but no references tag?

Formatting & MediaWiki: messages


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4