Commit graph

4 commits

Author SHA1 Message Date
Guy Van den Broeck
44fcbc51c5 Using referenses inside of foreach loops. 2008-08-18 14:55:36 +00:00
Roan Kattouw
4a286d57f6 Cleaned up HTMLDiff implementation for readability:
* Coding style consistency and indentation
* Removed unneccesary require_once(), the AutoLoader will load the right file automatically
* sizeof -> count, TRUE -> true, FALSE -> false, NULL -> null
* Use Xml:: functions
* Rename TagNode::splitUntill() to splitUntil() and $hasNotDeletedDescendant to $hasNonDeletedDescendant
* Flip TagNode::$blocks, TagToStringFactory::$containerTags and TagToStringFactory::$styleTags
* Merging if's in Node::getParentTree()
* Use a smart foreach() loop rather than two while()s and an if() in TagNode::splitUntil()
* Put all of TextNodeDiffer's members on top rather than scattering them between functions
* Use PHP's double-quoted string coolness rather than sprintf() or concatenation
* Use a smart foreach loop rather than array_keys() and a for() in TagToString::addAttributes()

TODO:
* Use interface messages rather than TagToString::$bundle so they can be translated
* Use constants for magic numbers like 1.35, 1000 and 2000 in calls to WikiDiff3::__construct()
2008-08-18 13:48:44 +00:00
Guy Van den Broeck
3712ab270d Performance improvements to diff algorithms 2008-08-18 00:16:32 +00:00
Guy Van den Broeck
89f8141a7f New implementation of wikidiff3 algorithm replacing the previous one and basic HTML diffing support, both integrated with DifferenceEngine 2008-08-15 11:46:46 +00:00