Template:StringDiff
Shows character changes between two strings in Wiki-Diff page style.
Usage
{{StringDiff|Example of old text...|Example with new text!}}
renders as
| − | Example | + | Example with new text! |
Right-to-left languages
Use the extra parameter direction=rtl. Example:
{{StringDiff|يدعي و يصلي|يدعي و يصلي|direction=rtl}}
renders as
| − | يدعي و | + | يدعي و يصلي |
References
This template calls Module:Diff.
Taken from https://commons.wikimedia.org/wiki/Template:StringDiff
TODO
For correct styling the module mediawiki.diff.styles needs to be loaded, containing the CSS for the diff classes. We currently do this for every page (in MediaWiki:Common.js). A better solution would be to install Extension:TemplateStyles and only load this module on pages where it is needed.