PmWiki's built in function for page history currently shows a comparison between each 2 lines of 2 versions, but without any highlighting. If the lines are long and the changes small, it is sometimes very difficult to see what actually changed.
This recipe integrates the http://pear.php.net/package/Text_Diff package into the PmWiki original function to provide the highlighting so one can immediately spot the differences. You have to press "Show changes to markup" on the history page, to see the highlighting.
Example of markup highlighting:
cookbook/pagerevinline/pagerevinline.php /Text/Diff.php /Diff/Renderer.php /Renderer/inline.php /Engine/native.php
2. Add this to your local/config.php file:
if ($action=='diff') include_once("
If you would like to default to the markup view in the page history, add these lines instead:
if(!isset($_REQUEST['source'])) $DiffShow['source'] ='y'; if ($action=='diff') include_once("
(This exact sequence is important in order for the "Show changes to markup/preview" links to work properly.)
From version 2.2.12, PmWiki contains a built-in word-level difference highlighter. See
Integration with Limit Diffs Per Page
See Discussion at InlineDiff-Talk