ibatullin / htmldiff

A diff library that uses html tags to show differences

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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. 

About

A diff library that uses html tags to show differences

License:MIT License


Languages

Language:Ruby 100.0%