From 3ea1ef881f4d7b0c31c74d63cf1bed7925724319 Mon Sep 17 00:00:00 2001 From: Alexey Verkhovsky Date: Sun, 22 Jan 2006 21:40:20 +0000 Subject: [PATCH] Refactoring and deleting unused code from lib/diffr.rb until I can understand what it says. Also fixes #256. The build is still broken. --- README | 3 +- lib/diff.rb | 668 +++++++++++--------------------- test/unit/diff_test.rb | 131 +++---- test/unit/page_renderer_test.rb | 5 +- 4 files changed, 298 insertions(+), 509 deletions(-) diff --git a/README b/README index a80d0914..0868a3ec 100755 --- a/README +++ b/README @@ -50,7 +50,8 @@ to install (until somebody sends a patch to properly package Instiki for all tho * Internationalization: Wiki words in any latin, greek, cyrillian, or armenian characters * Color diffs: Track changes through revisions * Definitely can run on SQLite and MySQL -* May be able to run on Postgres, Oracle, DB2 and SqlServer (if you try this ) +* May be able to run on Postgres, Oracle, DB2 and SqlServer. If you try this, and it works + (or, it doesn't, but you make it work) please write about it on Instiki.org. ===Command-line options: * Run "ruby instiki --help" diff --git a/lib/diff.rb b/lib/diff.rb index 4a4e80f0..acc82189 100644 --- a/lib/diff.rb +++ b/lib/diff.rb @@ -1,205 +1,111 @@ -# heavily based off difflib.py - see that file for documentation -# ported from Python by Bill Atkins +module HTMLDiff -# This does not support all features offered by difflib; it -# implements only the subset of features necessary -# to support a Ruby version of HTML Differ. You're welcome to finish this off. - -# By default, String#each iterates by line. This isn't really appropriate -# for diff, so often a string will be split by // to get an array of one- -# character strings. - -# Some methods in Diff are untested and are not guaranteed to work. The -# methods in HTMLDiff and any methods it calls should work quite well. - -# changes by DenisMertz -# * main change: -# ** get the tag soup away -# the tag soup problem was first reported with

tags, but it appeared also with -#

  • ,