− | This | + | This was a test! |
![]() | This is the template sandbox page for Template:Text diff (diff). See also the companion subpage for test cases. |
![]() | This template uses Lua: |
This template can be used to show proposed changes, e.g. on talk pages.
Usage
edit{{TextDiff|Old text.|New text.}}
− | + | New text. |
Limitations
editThis 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
editTemplateData for Text diff
This template compares two texts. The comparison is formatted similarly to a "diff" (see Help:Diff).
Parameter | Description | Type | Status | |
---|---|---|---|---|
Old text | 1 | Specify the old wikitext here. | Line | required |
New text | 2 | Specify the new wikitext here. | Line | required |
See also
edit- User:NguoiDungKhongDinhDanh/FormattedEditRequest, a script for automatically producing diffs similar to the ones produced by this template
- {{StringDiff}}, which produces character-level diffs