Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

Jump to content

Template:Text diff/doc

From Wikipedia, the free encyclopedia

This template can be used to show proposed changes, e.g. on talk pages.

Usage

[edit]
{{Text diff|Old text.|New text.}}

produces a diff showing the changes:

Old text.
+
New text.

Warning

[edit]

The template uses a sentinel value to detect whether it has been filled out properly when inserted via Template:Request edit button/preload. Using the sentinel value produces a warning message:

{{Text diff|ORIGINAL_WIKITEXT|CHANGED_WIKITEXT}}

Warning Unnamed parameter |1= set to default value. Please change it. Failure to use {{Text diff}} to specify your requested text changes, if not adequately described above, may lead to your request being denied.

Limitations

[edit]

This template is suitable only for comparing a single in-line string of text. Use of this template to compare multi-line content (i.e. HTML block content, text including line breaks) will result in syntax errors.

This template must be placed on a new line, i.e. with a line break before the template. Adding the template to a line that is indented with a colon or asterisk may result in syntax errors.

TemplateData

[edit]
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Text diff in articles based on its TemplateData.

TemplateData for Text diff

This template compares two texts. The comparison is formatted similarly to a "diff" (see Help:Diff).

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Old text1

Specify the old wikitext here.

Linerequired
New text2

Specify the new wikitext here.

Linerequired

See also

[edit]