From: Geoffrey T. D. <da...@us...> - 2001-12-13 05:10:07
|
Update of /cvsroot/phpwiki/phpwiki/lib In directory usw-pr-cvs1:/tmp/cvs-serv6353/lib Modified Files: diff.php Added Files: difflib.php Log Message: Refactor diff code: o Code clean-up and refactor. o Split the PhpWiki-independent part of the code into lib/difflib.php. o New CSS-formatted unified diff output replaces old table-heavy format. o Add character-level diffs. Issues: o New CSS-formatted diffs are very ugly in NS4 (and probably other oldish browsers.) o Character-level diffs may be overkill. Maybe back off to word-level diffs? ***** Error reading new file: [Errno 2] No such file or directory: 'difflib.php' Index: diff.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/diff.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** diff.php 2001/12/11 05:51:10 1.16 --- diff.php 2001/12/13 05:10:04 1.17 *************** *** 3,1025 **** // diff.php // ! // A PHP diff engine for phpwiki. // ! // Copyright (C) 2000 Geoffrey T. Dairiki <da...@da...> // You may copy this code freely under the conditions of the GPL. // ! // FIXME: possibly remove assert()'s for production version? [...1185 lines suppressed...] *************** *** 1143,1149 **** } else { ! //$fmt = new WikiDiffFormatter; ! $fmt = new WikiUnifiedDiffFormatter; ! $html .= $fmt->format($diff, $old->getContent()); } } --- 278,287 ---- } else { ! // New CSS formatted unified diffs (ugly in NS4). ! $fmt = new HtmlUnifiedDiffFormatter; ! ! // Use this for old table-formatted diffs. ! //$fmt = new TableUnifiedDiffFormatter; ! $html .= $fmt->format($diff); } } |