A diff library that uses html tags to show differences
Switch branches/tags
Nothing to show
Clone or download
myobie Merge pull request #2 from huacnlee/master.
I fixed bug for Chinese content.
Latest commit c3b9112 May 4, 2011
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib Fix word position bug, and Test added. Apr 22, 2011
spec Fix word position bug, and Test added. Apr 22, 2011
LICENSE Now a gem and has specs Nov 21, 2008
README Now a gem and has specs Nov 21, 2008
Rakefile Now a gem and has specs Nov 21, 2008
TODO Now a gem and has specs Nov 21, 2008
htmldiff.gemspec Now a gem and has specs Nov 21, 2008

README

class Stuff

  class << self
    include HTMLDiff
  end
  
  # or extend HTMLDiff ?

end

Stuff.diff('a word is here', 'a nother word is there')

# => 'a<ins class=\"diffins\"> nother</ins> word is <del class=\"diffmod\">here</del><ins class=\"diffmod\">there</ins>'

Checkout the crappy specs for good examples.